bitbucket.org/ai69/amoy@v0.2.3/minmax.go (about)

     1  package amoy
     2  
     3  import "math"
     4  
     5  const (
     6  	// MinUint the smallest possible value of uint.
     7  	MinUint = uint(0)
     8  	// MaxUint the largest possible value of uint.
     9  	MaxUint = ^uint(0)
    10  
    11  	// MinUint32 the smallest possible value of uint32.
    12  	MinUint32 = uint32(0)
    13  	// MaxUint32 the largest possible value of uint32.
    14  	MaxUint32 = ^uint32(0)
    15  
    16  	// MinUint64 the smallest possible value of uint64.
    17  	MinUint64 = uint64(0)
    18  	// MaxUint64 the largest possible value of uint64.
    19  	MaxUint64 = ^uint64(0)
    20  
    21  	// MinInt the smallest possible value of int.
    22  	MinInt = -MaxInt - 1
    23  	// MaxInt the largest possible value of int.
    24  	MaxInt = int(^uint(0) >> 1)
    25  
    26  	// MinInt32 the smallest possible value of int.
    27  	MinInt32 = -MaxInt32 - 1
    28  	// MaxInt32 the largest possible value of int.
    29  	MaxInt32 = int32(^uint32(0) >> 1)
    30  
    31  	// MinInt64 the smallest possible value of int.
    32  	MinInt64 = -MaxInt64 - 1
    33  	// MaxInt64 the largest possible value of int.
    34  	MaxInt64 = int64(^uint64(0) >> 1)
    35  )
    36  
    37  var (
    38  	// PositiveInfinity indicates the positive infinity value.
    39  	PositiveInfinity = math.Inf(1)
    40  	// NegativeInfinity indicates the negative infinity value.
    41  	NegativeInfinity = math.Inf(-1)
    42  )