FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library

GNU Multiple Precision Arithmetic Library

Contents
Language bindings
See also
References

{{cite web\n | url=https://gmplib.org/download/gmp/archive/\n | title=GNU MP archive\n | access-date=2018-12-03}}</ref>"},"latest release version":{"wt":"{{wikidata|property|preferred|references|edit|Q1205818|P348|P548=Q2804309}}"},"latest release date":{"wt":"{{wikidata|qualifier|preferred|single|Q1205818|P348|P548=Q2804309|P577}}"},"latest preview version":{"wt":"{{wikidata|property|preferred|references|edit|Q1205818|P348|P548=Q51930650}}"},"latest preview date":{"wt":"{{wikidata|qualifier|preferred|single|Q1205818|P348|P548=Q51930650|P577}}"},"programming language":{"wt":"[[C (programming language)|C]], ([[C++]], [[Assembly language|assembly]] optionally)"},"genre":{"wt":"[[Mathematical software]]"},"license":{"wt":"Dual [[GNU Lesser General Public License|LGPLv3]] – [[GNU General Public License|GPLv2]]<ref name=what/>"}},"i":0}}]}'>
GNU Multiple Precision Arithmetic Library
DeveloperGNU Project
Release1991;35 years ago (1991)
Repository
  • gmplib.org/repo/ #include<stdio.h> #include<gmp.h> intmain(void){ mpz_tx,y,result; mpz_init_set_str(x,"7612058254738945",10); mpz_init_set_str(y,"9263591128439081",10); mpz_init(result); mpz_mul(result,x,y); gmp_printf( " %Zd\n" "*\n" " %Zd\n" "--------------------\n" "%Zd\n", x,y,result ); // free used memory mpz_clear(x); mpz_clear(y); mpz_clear(result); return0; }

This code calculates the value of import<gmpxx.h>; importstd; intmain(){ mpz_classx("7612058254738945"); mpz_classy("9263591128439081"); mpz_classresult=x*y; std::println( " {}\n" "*\n" " {}\n" "--------------------\n" "{}", x.get_str(),y.get_str(),result.get_str() ); return0; }

Language bindings

edit
Library name Language License
GNU Multi-Precision Library C, C++ LGPL
Math::GMP Perl LGPL
Math::GMPz, Math::GMPf and Math::GMPq Perl Artistic License v1.0 + GPL v1.0-or-later
General Multiprecision Python Project Python LGPL
R package 'gmp' R GPL
The RubyGems project Ruby Apache 2.0
Rust FFI bindings for GMP, MPFR and MPC Rust LGPL
GNU Multi-Precision Library for PHP PHP PHP
GNU Multi-Precision Routines for SBCL Archived 2020-11-19 at the Wayback Machine Common Lisp Public domain
Ch GMP Ch Proprietary
Parallel GMP Wrapper for BMDFM BMDFM LISP – C Public domain
Glasgow Haskell Compiler (The implementation of Integer is basically a binding to GMP) Haskell BSD
luajit-gmp LuaJIT MIT
gmp-wrapper-for-delphi Delphi MIT
Zarith OCaml LGPL
Math.Gmp.Native Library .NET MIT
nim-gmp Nim MIT
JGMP Java LGPL

See also

edit

References

edit