Commit Graph

  • 7a2b4eab62 Fix test and fix #30 mratsim 2018-05-02 17:11:02 +0200
  • a7e4ab6568 Add failing div2n1n case mratsim 2018-05-02 17:09:08 +0200
  • b72cb3e817 Add corner cases to test suite mratsim 2018-05-01 15:41:53 +0200
  • fd0482180f
    Add bigint serialization (hex and decimal) (#29) Mamy Ratsimbazafy 2018-04-30 13:38:55 +0200
  • 1fc6a29fe3 Temporarily remove all the noInit pragma mratsim 2018-04-27 19:44:36 +0200
  • 60ab3ec9cd Add (failing) tests with big ints conversion mratsim 2018-04-27 18:57:57 +0200
  • e8f70fbaac dump default to bigEndian, split toString in Stint and Stuint mratsim 2018-04-27 18:19:58 +0200
  • 9c77abf481 Fix parsing of negative hex numbers, add test_io to the suite mratsim 2018-04-27 18:14:47 +0200
  • 24f3be6ddd more compile-time asserts mratsim 2018-04-27 17:50:44 +0200
  • b433e70823 Fix static assert check mratsim 2018-04-27 11:04:37 +0200
  • aa8a90d2cd Move runtime check to compile-time mratsim 2018-04-27 10:53:59 +0200
  • 5b6d49b7fc Add hexdump test mratsim 2018-04-26 21:20:25 +0200
  • 5fcc4f59b7 Fix power of 2 division (what was I thinking?) mratsim 2018-04-26 21:20:03 +0200
  • 82c6d53407 Fix hex dumping mratsim 2018-04-26 21:03:58 +0200
  • 577a04b03c Fix decimal string conversion mratsim 2018-04-26 20:39:48 +0200
  • 1978c5fc97
    Merge pull request #28 from status-im/Fix-division-corner-case Mamy Ratsimbazafy 2018-04-26 20:33:51 +0200
  • 69a8ace070 Remove a buggy division shortcut mratsim 2018-04-26 20:32:22 +0200
  • 25e1f3e6c2 Add division corner case test mratsim 2018-04-26 19:57:42 +0200
  • a9d2d05e4a make conversion toString compile mratsim 2018-04-26 19:40:01 +0200
  • 0d16eb0baf Improve highlow for int, remove most_significant_word_mut mratsim 2018-04-26 19:38:52 +0200
  • bbbf3c15b8 Add parsing test mratsim 2018-04-26 18:27:18 +0200
  • 2cd2efc890 Fix carry bug in signed add mratsim 2018-04-26 18:26:06 +0200
  • 8b2cfa21ad Add serialization for decimal and hex mratsim 2018-04-26 17:32:41 +0200
  • f520f7817b
    Merge pull request #27 from status-im/signed-integers Mamy Ratsimbazafy 2018-04-26 13:06:51 +0200
  • 5ac6e229a0 update signed multiplication comment mratsim 2018-04-26 12:34:28 +0200
  • 6d2562ff5f Implement absolute value and signed modulo/division mratsim 2018-04-26 12:27:02 +0200
  • 8727adfcf6 Implement signed multi-precision multiplication + tests mratsim 2018-04-25 22:48:25 +0200
  • ee02de16fd Fix one, it impacted signed int negation and uint division (why was it not catched?). Signed int pass the full test suite mratsim 2018-04-25 21:58:10 +0200
  • 37ebd13dd4 Implement add, sub, neg with proper overflow detection mratsim 2018-04-25 21:21:58 +0200
  • d690923310 Update Stint in header + mention unsigned vs signed int in tests mratsim 2018-04-25 21:21:25 +0200
  • 0296b5eca9 Add sub, proper negate bound checking, high and low, most significant word mutation mratsim 2018-04-25 19:51:14 +0200
  • 8b412b879d Add tests for negative numbers mratsim 2018-04-25 17:58:55 +0200
  • b34019c0b5 Add signed initialization, bitwise ops, addition, negation mratsim 2018-04-25 17:50:53 +0200
  • e2ab2dbf59 Add signed word iteration mratsim 2018-04-25 17:02:44 +0200
  • 97fbe56353 Add most significant bit and isNegative proc mratsim 2018-04-25 15:41:59 +0200
  • b3dedf7824 Split initialization and conversion proc mratsim 2018-04-25 14:43:24 +0200
  • 40c2215804 Add the IntImpl type. Rename uint_type to datatypes mratsim 2018-04-25 14:27:55 +0200
  • f189d13b42 Prefix repo with nim mratsim 2018-04-25 14:08:31 +0200
  • 00a634d2f2 Don't use single letter function like u(256) mratsim 2018-04-25 13:36:56 +0200
  • 102a1b0f0c
    Rename the library to Stint (#26) Mamy Ratsimbazafy 2018-04-25 12:52:00 +0200
  • 4001feebe6 Rename the library to Stint mratsim 2018-04-25 12:41:23 +0200
  • 52a1849075 Add (deactivated) test vs ttmath mratsim 2018-04-24 19:07:22 +0200
  • d0606a338f fix travis / nimble version mratsim 2018-04-24 18:40:41 +0200
  • 0987af4467 Fix #25 (binary shift change from bit_length to clz). Div/mod is now correct. Full test suite is passing mratsim 2018-04-24 18:18:36 +0200
  • 0dc0b82220 Fix https://github.com/status-im/nim-mpint/issues/23 shr and shl max limit triggering undefined behaviour mratsim 2018-04-24 17:21:16 +0200
  • bfa8393878
    Add property based testing (#24) Mamy Ratsimbazafy 2018-04-24 16:52:13 +0200
  • a9c6e713e8 move `*` up as less likely to fail mratsim 2018-04-24 16:39:37 +0200
  • 6ddf2078d5 Add debug and release test to property testing see aliasing: https://github.com/status-im/nim-mpint/issues/23 mratsim 2018-04-24 16:37:47 +0200
  • e9d5f79ab7 parametrize itercount mratsim 2018-04-24 16:14:11 +0200
  • 1a1afc8c3f Update with quickcheck support of uint: https://github.com/alehander42/nim-quicktest/issues/2 mratsim 2018-04-24 16:10:16 +0200
  • ce1f6eea74 Reorder by testing what is most dependant (likely to go wrong) later mratsim 2018-04-24 15:33:43 +0200
  • 1974ca848f Add property-based testing mratsim 2018-04-24 15:10:19 +0200
  • d5794ffbe1
    Use word iteration for bitwise op (#22) + 10% perf improvement. Mamy Ratsimbazafy 2018-04-21 17:21:14 +0200
  • 6376a11a96 Fix add_sub mratsim 2018-04-21 17:16:27 +0200
  • 5744f0cd47 Use iterators for bit operations. Optimize MpUint initialization mratsim 2018-04-21 17:11:57 +0200
  • f203218985 Type resolution in macro for generic return values in iterators is broken ... mratsim 2018-04-21 14:48:45 +0200
  • 17e7ba5d63 Try with iterator (failing) mratsim 2018-04-21 14:19:19 +0200
  • 4ed4252af2 Use iterator for word size iteration. mratsim 2018-04-21 13:50:43 +0200
  • a2220617a0
    update benchmark result Mamy Ratsimbazafy 2018-04-21 12:16:26 +0200
  • 1749e0e575
    [WIP] Division and multiplication optimization (#21) Mamy Ratsimbazafy 2018-04-21 12:12:05 +0200
  • d341b70428 inline initMpUintImpl for another 20% speed. Only 20% slower than ttmath without ASM mratsim 2018-04-21 12:09:31 +0200
  • ff15b23d0f Fix comparison, optimize one() mratsim 2018-04-21 11:55:49 +0200
  • 964ba79ae1 Comparison inlining and optimization. 25% speed increase. 50% slower than ttmath now 🔥 mratsim 2018-04-21 11:38:07 +0200
  • dfaf3a7243 Prepare for optimizing comparison operators mratsim 2018-04-21 10:57:37 +0200
  • b668d43c72 Fix call. Now only 2x slower than ttmath mratsim 2018-04-21 03:00:35 +0200
  • 57cdaa08c5 Reimplement multiplication with minimum allocation mratsim 2018-04-21 02:58:41 +0200
  • cfd1c742b9 25% speed increase. Within 3x of ttmath mratsim 2018-04-20 17:57:10 +0200
  • 249bb74e8e Change bitops, simplify bithacks to detect new fast division cases mratsim 2018-04-20 17:00:28 +0200
  • b75feba183 1st part, special cases of fast division mratsim 2018-04-20 16:01:23 +0200
  • 98ca350184 forgot to undo normalization (why did the test pass :??) mratsim 2018-04-20 15:02:18 +0200
  • 28cc965e13 Division: special case if dividend can overflow. 10% improvement. mratsim 2018-04-20 14:55:42 +0200
  • 5303d978f1 Special case when divisor is less than halfSize x2 speed 🔥 (still 4x slower than ttmath on Uint256) mratsim 2018-04-20 14:40:35 +0200
  • db3314c760 Upgrade benchmark to Uint256 mratsim 2018-04-20 13:59:00 +0200
  • 798217f30d more cleanup mratsim 2018-04-20 13:50:18 +0200
  • 6de1288295 Another unneed proc removal/temporary step mratsim 2018-04-20 13:32:15 +0200
  • 537f1da631 Implement in place substraction in terms of substraction #10 mratsim 2018-04-20 13:20:57 +0200
  • fab45af9d3 Managed to get best borrow code for the not inlined substraction #10 mratsim 2018-04-20 12:59:15 +0200
  • 37c8ff2e38 Clean-up code, part 1 mratsim 2018-04-20 12:44:53 +0200
  • 7a5fc76561 typo mratsim 2018-04-20 12:14:36 +0200
  • 8a06bb28a0 Improve codegen for borrow. Fix #10 mratsim 2018-04-20 11:55:15 +0200
  • 6eeba3d41a
    Division: Fix recursive divide-and-conquer (#20) Mamy Ratsimbazafy 2018-04-20 11:13:47 +0200
  • dfa0762624 Move division it's own file mratsim 2018-04-20 10:47:32 +0200
  • 9dfd48990d Fix forward declaration mratsim 2018-04-20 10:36:51 +0200
  • 4452c0e1ba Move debug utils in a specific folder mratsim 2018-04-20 10:29:27 +0200
  • d7d6b0d069 Cleanup: remove debugecho mratsim 2018-04-20 10:19:12 +0200
  • 83a2dea849 Fix countLeadingZero for nested uint mratsim 2018-04-19 18:56:51 +0200
  • 2099f11e1e Add another failing shift test mratsim 2018-04-19 17:03:59 +0200
  • eca4c5366b forgot to not multiply by 8 the size mratsim 2018-04-19 16:47:22 +0200
  • 76f8a5974e Fix compilation for the nested version mratsim 2018-04-19 16:43:14 +0200
  • 216b17f869 Division is wooorrrrkkinnnggg 🔥 mratsim 2018-04-19 14:41:12 +0200
  • 66d6d12b01 Fix one part of div3n2n mratsim 2018-04-19 00:38:16 +0200
  • d4f304d6c4 Almost there mratsim 2018-04-18 21:58:12 +0200
  • 5f01f1be3b divmod fixed for single nesting (?) mratsim 2018-04-18 21:34:21 +0200
  • 9ef4bd2866 Fix shl bug ... (need fuzzy testing) mratsim 2018-04-18 21:09:46 +0200
  • 5ecee899c5 Getting inspired by uint128 didn't work for recursive. Use recursive algo from the get go mratsim 2018-04-18 19:11:08 +0200
  • 7b7535dc72 Revert borrow detection, needed a cleverer scheme. mratsim 2018-04-18 15:09:22 +0200
  • 7edc725610 Simplify div2n1n mratsim 2018-04-07 14:00:52 +0200
  • 55dd38c67c Fix borrow border case: see https://github.com/status-im/mpint/issues/10 mratsim 2018-03-30 14:25:04 +0200
  • 6c21b54a87 Significantly improve carry/borrow assembly generation https://github.com/status-im/mpint/issues/10 mratsim 2018-03-30 01:40:30 +0200
  • 03cb394b5d Fix xn vs x in div mratsim 2018-03-30 01:08:13 +0200