Skip to content

Commit

Permalink
Decimal: add (some) Decimal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
db47h committed May 23, 2020
1 parent f92eeb0 commit 25bd73f
Show file tree
Hide file tree
Showing 2 changed files with 1,864 additions and 110 deletions.
19 changes: 0 additions & 19 deletions decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
package decimal

import (
"encoding"
"encoding/gob"
"fmt"
"math"
"math/big"
Expand All @@ -25,19 +23,6 @@ const debugDecimal = true // enable for debugging
// the precision of IEEE-754 decimal128.
const DefaultDecimalPrec = 34

var decimalZero Decimal

var (
// required implemented interfaces
_ fmt.Stringer = &decimalZero
_ fmt.Scanner = &decimalZero
_ fmt.Formatter = &decimalZero
_ encoding.TextMarshaler = &decimalZero
_ encoding.TextUnmarshaler = &decimalZero
_ gob.GobEncoder = &decimalZero
_ gob.GobDecoder = &decimalZero
)

// A nonzero finite Decimal represents a multi-precision decimal floating point
// number
//
Expand Down Expand Up @@ -1642,7 +1627,3 @@ func (z *Decimal) SetBitsExp(mant []Word, exp int64) *Decimal {
}
return z
}

func (x *Decimal) mantDigits() int64 {
return int64(len(x.mant)) * _DW
}
Loading

0 comments on commit 25bd73f

Please sign in to comment.