math/big: improved documentation
- moved existing package documentation from nat.go to doc.go
- expanded on it
For #11241.
Change-Id: Ie75a2b0178a8904a4154307a1f5080d7efc5489a
Reviewed-on: https://go-review.googlesource.com/15042
Reviewed-by: Alan Donovan <adonovan@google.com>
diff --git a/src/math/big/nat.go b/src/math/big/nat.go
index 6545bc1..121daec 100644
--- a/src/math/big/nat.go
+++ b/src/math/big/nat.go
@@ -2,31 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package big implements multi-precision arithmetic (big numbers).
-// The following numeric types are supported:
-//
-// Int signed integers
-// Rat rational numbers
-// Float floating-point numbers
-//
-// Methods are typically of the form:
-//
-// func (z *T) Unary(x *T) *T // z = op x
-// func (z *T) Binary(x, y *T) *T // z = x op y
-// func (x *T) M() T1 // v = x.M()
-//
-// with T one of Int, Rat, or Float. For unary and binary operations, the
-// result is the receiver (usually named z in that case); if it is one of
-// the operands x or y 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, *Rat, or *Float take an operand as
-// the receiver (usually named x in that case).
-//
-package big
+// This file implements unsigned multi-precision integers (natural
+// numbers). They are the building blocks for the implementation
+// of signed integers, rationals, and floating-point numbers.
-// This file contains operations on unsigned multi-precision integers.
-// These are the building blocks for the operations on signed integers
-// and rationals.
+package big
import "math/rand"