...
1
2
3 package number
4
5 import "strconv"
6
7 func _() {
8
9
10 var x [1]struct{}
11 _ = x[ToNearestEven-0]
12 _ = x[ToNearestZero-1]
13 _ = x[ToNearestAway-2]
14 _ = x[ToPositiveInf-3]
15 _ = x[ToNegativeInf-4]
16 _ = x[ToZero-5]
17 _ = x[AwayFromZero-6]
18 _ = x[numModes-7]
19 }
20
21 const _RoundingMode_name = "ToNearestEvenToNearestZeroToNearestAwayToPositiveInfToNegativeInfToZeroAwayFromZeronumModes"
22
23 var _RoundingMode_index = [...]uint8{0, 13, 26, 39, 52, 65, 71, 83, 91}
24
25 func (i RoundingMode) String() string {
26 if i >= RoundingMode(len(_RoundingMode_index)-1) {
27 return "RoundingMode(" + strconv.FormatInt(int64(i), 10) + ")"
28 }
29 return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]
30 }
31
View as plain text