Home | History | Annotate | Download | only in strconv

Lines Matching defs:decimal

5 // Multiprecision decimal numbers.
8 // Can do binary floating point in multiprecision decimal precisely
9 // because 2 divides 10; cannot do decimal floating point
14 type decimal struct {
17 dp int // decimal point
22 func (a *decimal) String() string {
38 // zeros fill space between decimal point and digits
47 // decimal point in middle of digits
54 // zeros fill space between digits and decimal point
69 // (They are meaningless; the decimal point is tracked
71 func trim(a *decimal) {
81 func (a *decimal) Assign(v uint64) {
84 // Write reversed decimal in buf.
94 // Reverse again to produce forward decimal in a.d.
110 func rightShift(a *decimal, k uint) {
269 func leftShift(a *decimal, k uint) {
315 func (a *decimal) Shift(k int) {
335 func shouldRoundUp(a *decimal, nd int) bool {
354 func (a *decimal) Round(nd int) {
366 func (a *decimal) RoundDown(nd int) {
375 func (a *decimal) RoundUp(nd int) {
391 // Change to single 1 with adjusted decimal point.
399 func (a *decimal) RoundedInteger() uint64 {