-
Notifications
You must be signed in to change notification settings - Fork 0
/
errno.go
84 lines (79 loc) · 2.8 KB
/
errno.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package errors
/**
Error number
Fork from GSL: https://www.gnu.org/software/gsl/
**/
const (
SUCCESS = 0 /* SUCCESS */
FAILURE = -1 /* FAILURE */
CONTINUE = -2 /* iteration has not converged */
EDOM = 1 /* input domain error, e.g sqrt(-1) */
ERANGE = 2 /* output range error, e.g. exp(1e100) */
EFAULT = 3 /* invalid pointer */
EINVAL = 4 /* invalid argument supplied by user */
EFAILED = 5 /* generic failure */
EFACTOR = 6 /* factorization failed */
ESANITY = 7 /* sanity check failed - shouldn't happen */
ENOMEM = 8 /* malloc failed */
EBADFUNC = 9 /* problem with user-supplied function */
ERUNAWAY = 10 /* iterative process is out of control */
EMAXITER = 11 /* exceeded max number of iterations */
EZERODIV = 12 /* tried to divide by zero */
EBADTOL = 13 /* user specified an invalid tolerance */
ETOL = 14 /* failed to reach the specified tolerance */
EUNDRFLW = 15 /* underflow */
EOVRFLW = 16 /* overflow */
ELOSS = 17 /* loss of accuracy */
EROUND = 18 /* failed because of roundoff error */
EBADLEN = 19 /* matrix, vector lengths are not conformant */
ENOTSQR = 20 /* matrix not square */
ESING = 21 /* apparent singularity detected */
EDIVERGE = 22 /* integral or series is divergent */
EUNSUP = 23 /* requested feature is not supported by the hardware */
EUNIMPL = 24 /* requested feature not (yet) implemented */
ECACHE = 25 /* cache limit exceeded */
ETABLE = 26 /* table limit exceeded */
ENOPROG = 27 /* iteration is not making progress towards solution */
ENOPROGJ = 28 /* jacobian evaluations are not improving the solution */
ETOLF = 29 /* cannot reach the specified tolerance in F */
ETOLX = 30 /* cannot reach the specified tolerance in X */
ETOLG = 31 /* cannot reach the specified tolerance in gradient */
EOF = 32 /* end of file */
)
var (
RETSUCCESS = Error(SUCCESS)
RETFAILURE = Error(FAILURE)
RETCONTINUE = Error(CONTINUE)
ErrDOM = Error(EDOM)
ErrRANGE = Error(ERANGE)
ErrFAULT = Error(EFAULT)
ErrINVAL = Error(EINVAL)
ErrFAILED = Error(EFAILED)
ErrFACTOR = Error(EFACTOR)
ErrSANITY = Error(ESANITY)
ErrNOMEM = Error(ENOMEM)
ErrBADFUNC = Error(EBADFUNC)
ErrRUNAWAY = Error(ERUNAWAY)
ErrMAXITER = Error(EMAXITER)
ErrZERODIV = Error(EZERODIV)
ErrBADTOL = Error(EBADTOL)
ErrTOL = Error(ETOL)
ErrUNDRFLW = Error(EUNDRFLW)
ErrOVRFLW = Error(EOVRFLW)
ErrLOSS = Error(ELOSS)
ErrROUND = Error(EROUND)
ErrBADLEN = Error(EBADLEN)
ErrNOTSQR = Error(ENOTSQR)
ErrSING = Error(ESING)
ErrDIVERGE = Error(EDIVERGE)
ErrUNSUP = Error(EUNSUP)
ErrUNIMPL = Error(EUNIMPL)
ErrCACHE = Error(ECACHE)
ErrTABLE = Error(ETABLE)
ErrNOPROG = Error(ENOPROG)
ErrNOPROGJ = Error(ENOPROGJ)
ErrTOLF = Error(ETOLF)
ErrTOLX = Error(ETOLX)
ErrTOLG = Error(ETOLG)
ErrOF = Error(EOF)
)