-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
docs.go
29 lines (28 loc) · 1.08 KB
/
docs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package gmp implements multi-precision arithmetic (big numbers).
//
// This package provides a drop in replacement for Go's built in
// math/big integer package using the GNU Multiprecision Library (GMP)
// to implement the operations.
//
// GMP is very much faster than Go's math/big however it is an
// external C library with all the problems that entails (cgo,
// dependencies etc)
//
// The following numeric types are supported:
//
// - Int signed integers
// - Rat rational numbers are NOT yet supported
//
// Methods are typically of the form:
//
// func (z *Int) Op(x, y *Int) *Int (similar for *Rat)
//
// and implement operations z = x Op y with the result as receiver; if it
// is one of the operands it may be overwritten (and its memory reused).
// To enable chaining of operations, the result is also returned. Methods
// returning a result other than *Int or *Rat take one of the operands as
// the receiver.
package gmp