Nathan VanBenschoten
ecd4a8353a
Implement Modulus arithmetic function
2016-01-15 16:32:48 -05:00
Vadim Graboys
af95951b3f
Merge pull request #15 from pwiecz/master
...
Add a fast track to d.Cmp(d2) when d.exp == d2.exp
2016-01-13 16:11:24 -05:00
Vadim Graboys
873b9ea5ed
Merge pull request #17 from cockroachdb/nvanbenschoten/int_overflow
...
Prevent unnecessary int64 overflow in NewFromFloat
2016-01-13 15:47:47 -05:00
Nathan VanBenschoten
eae6d13435
Prevent unnecessary int64 overflow in NewFromFloat
2016-01-13 13:27:32 -05:00
Tom Linford
54efccb61f
Make Value take a pointer receiver
2015-12-23 17:00:06 -08:00
Vadim Graboys
f95dd20cca
Merge pull request #14 from faide/master
...
Added support for Numeric type in db storage
2015-12-18 15:06:24 -08:00
Piotr
cb949cead4
Add a fast track to d.Cmp(d2) when d.exp == d2.exp
...
This makes a noticeable difference when one is sorting a large slice
of decimals when most of them have the same precision, as it is saving
a lot of calls to rescale().
2015-12-11 23:54:57 +01:00
Florent AIDE
faca378c8a
Adding tests from the Scan method
2015-12-11 19:46:00 +01:00
Florent AIDE
b873aa2b43
Return nil instead of empty err in Scan
2015-12-11 06:37:27 +01:00
Florent AIDE
c30673fb5f
Use an idiomatic type switch for Scan type comparison
2015-12-11 06:34:52 +01:00
Florent AIDE
28bb8ff9f5
use directly the int64 instead of casting to float
2015-12-03 11:06:49 +01:00
Florent AIDE
9e9cba8a85
Better implementatin with switch and support for 0
2015-11-23 18:45:31 +01:00
Florent AIDE
c4b5af094a
Added support for Numeric type in db storage
2015-11-23 16:43:59 +01:00
Roland Averkamp
5c1d2008f5
refactoring div test. benchmarks for old Div vs. New Div
2015-09-03 20:11:07 +02:00
Roland Averkamp
696232de64
only formattimg, really!
2015-09-03 20:10:10 +02:00
Roland Averkamp
8b186db779
replaced original Div, added initialization check and and check for 0 in divide
2015-09-03 17:24:49 +02:00
Roland Averkamp
87964935d0
better method comments
...
use the godoc format for the method comments
2015-09-03 16:31:44 +02:00
Roland Averkamp
5a16ac0c8f
more tests for division
2015-09-03 13:19:16 +02:00
Roland Averkamp
49e27aea3d
larger test for QuoRem
2015-09-01 23:20:23 +02:00
Roland Averkamp
e4641fd8ba
added divsion with rest and rounded division
...
Added a division based on integer division with rest.
A simple rounded division aded.
2015-09-01 14:50:25 +02:00
Vadim Graboys
9995dc92ee
fix some small issues with scientific notation, add more tests
2015-07-31 16:22:14 -04:00
Vadim Graboys
f402c8cd87
add one more extreme-value test for scientific notation parsing
2015-07-31 12:52:50 -04:00
Vadim Graboys
7a95614e29
Merge pull request #10 from thiagoarruda/feature/parse-scientific-notation
...
Add scientific notation parsing
2015-07-31 12:51:16 -04:00
Thiago Arruda
632e313f4a
Fix possible int64 overflow and remove unnecessary code
2015-07-31 13:36:54 -03:00
Thiago Arruda
669901768e
Add negative numbers on init() and add more tests
2015-07-28 08:27:48 -03:00
Thiago Arruda
3e7f1c747e
Change exp to int64 to prevent overflow
2015-07-28 08:08:24 -03:00
Thiago Arruda
849f553b9d
Add scientific notation parsing
2015-07-24 13:25:40 -03:00
Vadim Graboys
6da60a24bd
update docs to make more clear
2015-07-24 07:40:22 -04:00
Vadim Graboys
96d9a5e02e
add Min and Max functions
2015-07-24 07:17:36 -04:00
Vadim Graboys
00831300e9
Merge pull request #7 from soyangel/patch-1
...
Fix Typo
2015-06-17 07:16:08 -04:00
Angel Luis Jimenez Martinez
2ee81318ae
Typo
2015-06-17 12:50:05 +02:00
Vadim Graboys
6e97405099
add stupid test for extreme values, fix some super-edge-case bugs
2015-06-14 15:39:05 -04:00
Vadim Graboys
54dc68463b
ensure decimal is initialized for new methods
2015-06-14 14:09:13 -04:00
Vadim Graboys
5359bc7cb4
add docs for Floor and Ceil
2015-06-14 13:10:35 -04:00
Vadim Graboys
1a6d69cb90
add FAQ to README
2015-06-14 13:06:00 -04:00
Vadim Graboys
354b07a0fb
add go 1.4 to travis
2015-06-14 12:05:42 -04:00
Vadim Graboys
e8dd4432ba
Merge pull request #3 from cmars/cmars-002-gocov
...
Add some test coverage
2015-06-14 12:03:58 -04:00
Vadim Graboys
9f2aa5999e
add .gitignore
2015-06-14 11:57:05 -04:00
Vadim Graboys
0c74aee0c1
add Round, Floor, Ceil, and StringFixed. Deprecate StringScaled
2015-06-14 11:56:33 -04:00
Casey Marshall
70bb313ce6
Improve error messages, readability of test cases.
2015-03-25 22:13:03 -05:00
Casey Marshall
d9c6f16ce5
Remove Go 1.1 from CI.
2015-03-25 22:12:31 -05:00
Vadim Graboys
ac401f1975
Merge pull request #2 from cmars/master
...
Updated godoc comments.
2015-03-24 08:47:32 -04:00
Casey Marshall
2f187e8d62
Add IntPart test.
2015-03-23 19:50:32 -05:00
Casey Marshall
0fb3379e01
Test unhappy JSON and XML paths.
2015-03-23 19:50:32 -05:00
Casey Marshall
78186b90c0
Add Equals test.
2015-03-23 19:50:32 -05:00
Casey Marshall
c6c99f4daa
Add XML test.
2015-03-23 19:50:32 -05:00
Casey Marshall
a2664e0073
Add round-trip JSON test.
2015-03-23 19:50:32 -05:00
Casey Marshall
9fc32a450f
Add negative test values once.
2015-03-23 19:50:32 -05:00
Casey Marshall
d589a882a7
Simplify Equals and Cmp godoc comments.
2015-03-23 16:41:30 -05:00
Artem Titoulenko
3d6bb50c86
remove arrows to save line space
2015-03-23 15:44:21 -04:00