268 Commits

Author SHA1 Message Date
jangko
f2959e5135
signed int bitwise 2023-06-13 22:17:43 +07:00
jangko
612ecb3d9b
signed int comparison 2023-06-13 21:53:19 +07:00
jangko
f07f574944
fix comparison 2023-06-13 20:39:22 +07:00
jangko
fb797d225e
signed int initialization 2023-06-13 19:51:49 +07:00
jangko
76b2baad6f
signed int signedness 2023-06-13 19:09:43 +07:00
jangko
8c5a96463c
nimvm workaround for primitives 2023-06-13 08:35:35 +07:00
jangko
7ce536423a
disable dot borrow temporary 2023-06-13 08:15:04 +07:00
jangko
e5c352fde2
fix stuint constructor 2023-06-13 08:13:39 +07:00
jangko
0dc6afe9d4
let the tests compileable and run 2023-06-12 21:07:15 +07:00
jangko
63a32129c8
rebase and try to make it works with clients 2023-06-12 20:26:36 +07:00
Mamy Ratsimbazafy
bff69b3f98
Add randomized testing vs GMP 2023-06-12 17:13:35 +07:00
Mamy Ratsimbazafy
27e9c9e441
Add randomized testing, harden against edge cases 2023-06-12 17:12:43 +07:00
Mamy Ratsimbazafy
4660dfe4a4
Use littleEndian for limb-endianness: bigEndian arch are very rare, untestable in CI, a pain to maintain and an intermediate serialization step instead of casting is cheap 2023-06-12 17:11:14 +07:00
Mamy Ratsimbazafy
7efa2483e4
Division/modulo implemented - pass property-based testing vs ttmath 2023-06-12 17:11:13 +07:00
Mamy Ratsimbazafy
53d2fd14f3
uint division - compile and pass the single limb tests 2023-06-12 17:11:13 +07:00
Mamy Ratsimbazafy
c2ed8a4bc2
stash div refactor 2023-06-12 17:11:09 +07:00
Mamy André-Ratsimbazafy
f952314c21
dump progress 2023-06-12 17:08:22 +07:00
Mamy André-Ratsimbazafy
dd3ab71029
For division we need internal add/sub/shift/bitwise so create internal files [skip-ci] 2023-06-12 17:08:21 +07:00
Mamy André-Ratsimbazafy
dc9e0a43ca
Implement exponentiation, test mul, split mul/div tests 2023-06-12 17:08:21 +07:00
Mamy André-Ratsimbazafy
254d4da649
Pass extended precision bitops2 tests 2023-06-12 17:08:21 +07:00
Mamy André-Ratsimbazafy
59bca47012
Fix comparison operators 2023-06-12 17:08:21 +07:00
Mamy André-Ratsimbazafy
3df7f38260
Fix noInit issue at runtime, pass the bitwise tests 2023-06-12 17:08:21 +07:00
Mamy André-Ratsimbazafy
195480d58a
passing compile-time bitwise tests (but not runtime :?) 2023-06-12 17:08:20 +07:00
Mamy André-Ratsimbazafy
777a84e9f5
Implement toHex/fromHex and fix shl 2023-06-12 17:08:20 +07:00
Mamy André-Ratsimbazafy
2ac1ee3f1e
Fix compiletime primitives to pass all bitwise tests except large shifts 2023-06-12 17:08:20 +07:00
Mamy André-Ratsimbazafy
7f6c588ce3
Passing addition tests (however simple bitwise ops crash the int128 VM ... during compilation) 2023-06-12 17:08:20 +07:00
Mamy André-Ratsimbazafy
a0dec54c12
Implement multiplication 2023-06-12 17:08:20 +07:00
Mamy André-Ratsimbazafy
206ffa92cf
Implement multiprecision addition / substraction 2023-06-12 17:08:19 +07:00
Mamy André-Ratsimbazafy
cbbffe4e9c
reimplement bitwise 2023-06-12 17:08:19 +07:00
Mamy André-Ratsimbazafy
36cc2b2e02
Implement comparison 2023-06-12 17:08:19 +07:00
Mamy André-Ratsimbazafy
de87739635
Implement types and uint128 primitives 2023-06-12 17:08:19 +07:00
tersec
c0ae9e10a9
rm other styleCheckStyle ref 2023-06-08 12:03:16 +00:00
tersec
95b91474ce
remove Nim 1.2 and 1.4 support 2023-06-08 11:08:27 +00:00
tersec
86621eced1
remove pre-Nim 1.2 support (#127) 2023-06-05 11:42:36 +00:00
jangko
94fc521ee0
remove appveyor and travis scripts 2023-04-15 12:17:00 +07:00
tersec
3d1bd2bfbd
test both refc and ORC in post-1.6 Nim versions (#124) 2023-04-14 00:41:31 +00:00
tersec
5bed1111ab
use Nim 2.0 in CI (#123) 2023-04-07 15:28:22 +00:00
jangko
eb1f32c675
upgrade github actions to v3 2023-02-23 12:31:46 +07:00
jangko
493f31de63
reduce compiler warnings 2023-02-23 12:09:45 +07:00
tersec
3472a16fbc
avoid deprecation warnings on Nim 1.6 when using (#121) 2023-02-07 13:41:40 +01:00
G
f36623998f
fix(skipPrefixes): fix erroneous strip of 0b in hex numbers (#120)
* fix(skipPrefixes): fix erroneous strip of 0b in hex numbers

* refactor(skipPrefixes): normalize radix checks

* feat(stint): add tests for bin, oct, hex string conversions

* fix(stint): fix cast

* fix(stint): fix typo

* fix(stint): alternative format

* feat(stint): add test

* fix(stint): fix stint width in test
2022-10-03 12:15:45 +02:00
tersec
d1acb42743
update GitHub Actions CI images from deprecated Ubuntu 18.04 to 20.04 (#119) 2022-08-18 08:18:24 +00:00
Dustin Brody
27a7608f33
--styleCheck:error iff Nim >= 1.6 2022-07-22 10:40:38 +00:00
Dustin Brody
e726bfd969
update to supported macOS GitHub CI image 2022-07-22 09:03:57 +00:00
Jacek Sieka
c05f75a8da
comment style fix 2022-04-07 09:53:11 +02:00
Kim De Mey
e656ad40d1
Enable --styleCheck:usages (#118) 2022-02-24 20:09:53 +01:00
Mamy Ratsimbazafy
ddfa6c608a
Fix 32-bit failure on Nim 1.6 (#116)
* Nim 1.6 compiletime can now be affected by https://github.com/status-im/nim-stint/issues/92 ?

* seems like it happens on runtime too
2022-01-13 12:04:26 +01:00
Ștefan Talpalaru
e17113fb31
CI: test with multiple Nim versions (#114)
* CI: test with multiple Nim versions
2022-01-12 03:20:04 +01:00
jangko
036c71d06a
ci: bump mingw from v8.1.0 to v11.2.0 2021-10-30 13:09:21 +07:00
Mamy Ratsimbazafy
49d11d61b8
RangeError are actually defect and not catchable. (#111)
* RangeError are actually defect and not catchable.

* Don't use range types at runtime they throw RangeDefect
2021-10-08 10:08:56 +02:00