...
Source file
src/tawesoft.co.uk/go/operator/limits.go
Documentation:
src/tawesoft.co.uk/go/operator/limits.go
1 package operator
2
3 import (
4 "fmt"
5 "math"
6 )
7
8 const maxUint = ^uint(0)
9 const minUint = 0
10 const maxInt = int(maxUint >> 1)
11 const minInt = -maxInt - 1
12
13 const maxInt8 = math.MaxInt8
14 const maxInt16 = math.MaxInt16
15 const maxInt32 = math.MaxInt32
16 const maxInt64 = math.MaxInt64
17
18 const minInt8 = math.MinInt8
19 const minInt16 = math.MinInt16
20 const minInt32 = math.MinInt32
21 const minInt64 = math.MinInt64
22
23 const maxUint8 = math.MaxUint8
24 const maxUint16 = math.MaxUint16
25 const maxUint32 = math.MaxUint32
26 const maxUint64 = math.MaxUint64
27
28 const minUint8 = 0
29 const minUint16 = 0
30 const minUint32 = 0
31 const minUint64 = 0
32
33 const maxFloat32 = math.MaxFloat32
34 const maxFloat64 = math.MaxFloat64
35
36 const minFloat32 = -math.MaxFloat32
37 const minFloat64 = -math.MaxFloat64
38
39
40 var ErrorOverflow = fmt.Errorf("Overflow")
41
42
43
44 var ErrorUndefined = fmt.Errorf("Undefined operation")
45
46
47 var ErrorNaN = fmt.Errorf("Not a number (NaN)")
48
View as plain text