You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
6.9 KiB
HTML
157 lines
6.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- This manual describes how to install and use the GNU multiple precision
|
|
arithmetic library, version 6.1.0.
|
|
|
|
Copyright 1991, 1993-2015 Free Software Foundation, Inc.
|
|
|
|
Permission is granted to copy, distribute and/or modify this document under
|
|
the terms of the GNU Free Documentation License, Version 1.3 or any later
|
|
version published by the Free Software Foundation; with no Invariant Sections,
|
|
with the Front-Cover Texts being "A GNU Manual", and with the Back-Cover
|
|
Texts being "You have freedom to copy and modify this GNU Manual, like GNU
|
|
software". A copy of the license is included in
|
|
GNU Free Documentation License. -->
|
|
<!-- Created by GNU Texinfo 6.4, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>Introduction to GMP (GNU MP 6.1.0)</title>
|
|
|
|
<meta name="description" content="How to install and use the GNU multiple precision arithmetic library, version 6.1.0.">
|
|
<meta name="keywords" content="Introduction to GMP (GNU MP 6.1.0)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
|
|
<link href="index.html#Top" rel="up" title="Top">
|
|
<link href="Installing-GMP.html#Installing-GMP" rel="next" title="Installing GMP">
|
|
<link href="Copying.html#Copying" rel="prev" title="Copying">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="Introduction-to-GMP"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Installing-GMP.html#Installing-GMP" accesskey="n" rel="next">Installing GMP</a>, Previous: <a href="Copying.html#Copying" accesskey="p" rel="prev">Copying</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<a name="Introduction-to-GNU-MP"></a>
|
|
<h2 class="chapter">1 Introduction to GNU MP</h2>
|
|
<a name="index-Introduction"></a>
|
|
|
|
<p>GNU MP is a portable library written in C for arbitrary precision arithmetic
|
|
on integers, rational numbers, and floating-point numbers. It aims to provide
|
|
the fastest possible arithmetic for all applications that need higher
|
|
precision than is directly supported by the basic C types.
|
|
</p>
|
|
<p>Many applications use just a few hundred bits of precision; but some
|
|
applications may need thousands or even millions of bits. GMP is designed to
|
|
give good performance for both, by choosing algorithms based on the sizes of
|
|
the operands, and by carefully keeping the overhead at a minimum.
|
|
</p>
|
|
<p>The speed of GMP is achieved by using fullwords as the basic arithmetic type,
|
|
by using sophisticated algorithms, by including carefully optimized assembly
|
|
code for the most common inner loops for many different CPUs, and by a general
|
|
emphasis on speed (as opposed to simplicity or elegance).
|
|
</p>
|
|
<p>There is assembly code for these CPUs:
|
|
<a name="index-CPU-types"></a>
|
|
ARM Cortex-A9, Cortex-A15, and generic ARM,
|
|
DEC Alpha 21064, 21164, and 21264,
|
|
AMD K8 and K10 (sold under many brands, e.g. Athlon64, Phenom, Opteron)
|
|
Bulldozer, and Bobcat,
|
|
Intel Pentium, Pentium Pro/II/III, Pentium 4, Core2, Nehalem, Sandy bridge, Haswell, generic x86,
|
|
Intel IA-64,
|
|
Motorola/IBM PowerPC 32 and 64 such as POWER970, POWER5, POWER6, and POWER7,
|
|
MIPS 32-bit and 64-bit,
|
|
SPARC 32-bit ad 64-bit with special support for all UltraSPARC models.
|
|
There is also assembly code for many obsolete CPUs.
|
|
</p>
|
|
|
|
<a name="index-Home-page"></a>
|
|
<a name="index-Web-page"></a>
|
|
<p>For up-to-date information on GMP, please see the GMP web pages at
|
|
</p>
|
|
<div class="display">
|
|
<pre class="display"><a href="https://gmplib.org/">https://gmplib.org/</a>
|
|
</pre></div>
|
|
|
|
<a name="index-Latest-version-of-GMP"></a>
|
|
<a name="index-Anonymous-FTP-of-latest-version"></a>
|
|
<a name="index-FTP-of-latest-version"></a>
|
|
<p>The latest version of the library is available at
|
|
</p>
|
|
<div class="display">
|
|
<pre class="display"><a href="https://ftp.gnu.org/gnu/gmp/">https://ftp.gnu.org/gnu/gmp/</a>
|
|
</pre></div>
|
|
|
|
<p>Many sites around the world mirror ‘<samp>ftp.gnu.org</samp>’, please use a mirror
|
|
near you, see <a href="https://www.gnu.org/order/ftp.html">https://www.gnu.org/order/ftp.html</a> for a full list.
|
|
</p>
|
|
<a name="index-Mailing-lists"></a>
|
|
<p>There are three public mailing lists of interest. One for release
|
|
announcements, one for general questions and discussions about usage of the GMP
|
|
library and one for bug reports. For more information, see
|
|
</p>
|
|
<div class="display">
|
|
<pre class="display"><a href="https://gmplib.org/mailman/listinfo/">https://gmplib.org/mailman/listinfo/</a>.
|
|
</pre></div>
|
|
|
|
<p>The proper place for bug reports is <a href="mailto:gmp-bugs@gmplib.org">gmp-bugs@gmplib.org</a>. See
|
|
<a href="Reporting-Bugs.html#Reporting-Bugs">Reporting Bugs</a> for information about reporting bugs.
|
|
</p>
|
|
<br>
|
|
<a name="How-to-use-this-Manual"></a>
|
|
<h3 class="section">1.1 How to use this Manual</h3>
|
|
<a name="index-About-this-manual"></a>
|
|
|
|
<p>Everyone should read <a href="GMP-Basics.html#GMP-Basics">GMP Basics</a>. If you need to install the library
|
|
yourself, then read <a href="Installing-GMP.html#Installing-GMP">Installing GMP</a>. If you have a system with multiple
|
|
ABIs, then read <a href="ABI-and-ISA.html#ABI-and-ISA">ABI and ISA</a>, for the compiler options that must be used
|
|
on applications.
|
|
</p>
|
|
<p>The rest of the manual can be used for later reference, although it is
|
|
probably a good idea to glance through it.
|
|
</p>
|
|
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Installing-GMP.html#Installing-GMP" accesskey="n" rel="next">Installing GMP</a>, Previous: <a href="Copying.html#Copying" accesskey="p" rel="prev">Copying</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|