120 Commits

Author SHA1 Message Date
Friedel Ziegelmayer
3042607c90
feat: update dependencies 2019-12-11 00:48:19 +01:00
Tony Arcieri
266f1b0652 feat(deps): update zeroize to 1.1 2019-12-09 09:01:55 -08:00
dignifiedquire
5b3de9b0bb chore(num-bigint-dig): release 0.5.0 2019-10-13 16:29:37 +02:00
dignifiedquire
7a587a8ecf chore: fix crate version 2019-10-13 15:33:38 +02:00
dignifiedquire
7e7b231071 feat(deps): update zeroize 2019-10-13 15:30:50 +02:00
Robin Lambertz
874ab0fbaa feat: no_std support
* no_std support

* Use integer log2 when possible to estimate allocations

* Remove std features from a few dependencies

* Use libm for missing funcs in nostd environment

* Use autocfg to detect presence of i128

* Better CI test for nostd environment

* Move benchmark to a separate crate

* Make the tests pass in no_std builds

* Use thumbv7m target for nostd build test

* Add documentation about the no-std compatibility

* Make zeroize and prime features no_std-compatible

* Test each feature in nostd context

* Fix mac test to work in no_std environment

* Avoid using thread_rng in nostd tests

* Fix prime tests in nostd mode

* Fix all warnings and errors

* Only test nostd builds on nightly on travis

* Travis: Only do nostd builds on nightly
2019-10-13 15:14:14 +02:00
dignifiedquire
a0ba8ac498 feat(deps): update zeroize and use derive macro 2019-03-26 14:45:19 +01:00
dignifiedquire
ca8c31e097 feat(deps): upgrade to rand@0.6 2019-03-26 14:40:53 +01:00
dignifiedquire
80ffd7c027 feat: expose zeroize/nightly feature 2019-03-26 14:13:42 +01:00
gmorenz
93fcffd3e9 docs(cargo): fix typo in repo link 2019-03-18 12:54:17 +01:00
dignifiedquire
5fbee1da4d feat: add zeroize feature 2019-03-16 11:38:05 +01:00
dignifiedquire
666cdc6f2c (cargo-release) start next development iteration 0.3.1-alpha.0 2019-02-20 16:18:22 +01:00
dignifiedquire
887d57bf2f (cargo-release) version 0.3.0 2019-02-20 16:18:10 +01:00
dignifiedquire
f41212a3ee fixup: rebase issues 2019-01-22 12:54:45 +01:00
Josh Stone
97b0b17145 Expand the Roots benchmarks 2019-01-22 12:52:34 +01:00
goldenMetteyya
d4c0b721c9 feat: implement prime generation related features
also switches the benchmarks to criterion
2019-01-15 15:02:12 +01:00
dignifiedquire
ad076a8cd4 fix: test and some flags 2018-12-19 22:00:11 +01:00
dignifiedquire
2656a03c5a feat: use SmallVec as backing store 2018-12-19 19:46:26 +01:00
dignifiedquire
73a3f1eacb improve modpow perf and fix test 2018-12-19 19:10:19 +01:00
dignifiedquire
ca79006169 prepare for publishing 2018-11-24 12:04:44 +01:00
dignifiedquire
0c148e7207 start fixing after rebase 2018-11-07 13:41:59 +01:00
Josh Stone
02e2e4e7e9 Release 0.2.1 2018-11-02 17:08:29 -07:00
Manca Bizjak
1f2590656b Implement Roots for BigInt and BigUint
This commit implements num-integer::Roots trait
for BigInt and BigUint types, and also adds sqrt,
cbrt, nth_root as inherent methods to allow access
to them without importing Roots trait. For each
type tests were added as submodules in the roots
test module.

Signed-off-by: Manca Bizjak <manca.bizjak@xlab.si>
2018-07-11 12:14:46 +02:00
Josh Stone
de836f6fdc Release 0.2.0 2018-05-25 13:45:38 -07:00
Josh Stone
ec181ea593 Update rand CI 2018-05-22 16:56:54 -07:00
Josh Stone
9fdec42818 bump to rand 0.5 2018-05-22 14:16:20 -07:00
Josh Stone
23743e05db Add a mandatory "std" feature
We don't actually support `no_std` yet, and probably won't until `alloc`
is stable.  We're just reserving this ability with the "std" feature
now, and compilation will fail without.
2018-05-16 13:59:29 -07:00
Josh Stone
04252b7716 Add basic conversions for i128 and u128 2018-05-15 18:01:14 -07:00
Josh Stone
b374f9ac92 Merge branch 'num-bigint-0.1.x' into master 2018-05-14 13:01:51 -07:00
Josh Stone
10e00ff66a Release 0.1.44 2018-05-14 11:24:39 -07:00
Josh Stone
f44bd0aee2 Add a special case for single-digit divisors
It was pointed out in the blog post [Big Integers in Zig] that we don't
have a special case in `num-bigint` for single-digit divisors.  While
you can already get this optimization by dividing directly by `u32`,
it's easy to make small `BigUint` divisors work like this too.

    $ cargo benchcmp baseline single-div
     name                   baseline ns/iter  single-div ns/iter  diff ns/iter   diff %  speedup
     factorial_div_biguint  5,638,353         1,005,488             -4,632,865  -82.17%   x 5.61

`BigInt` will also gain from this, since it uses `BigUint` division
internally.

Running [zig-bn's facdiv-rs] shows a nice improvement too.  My i7-7700K
with Rust 1.26 goes from 4.15 seconds to just 0.65 -- a 6.38x speedup!

[Big Integers in Zig]: https://tiehuis.github.io/big-integers-in-zig#division-test-single-limb
[zig-bn's facdiv-rs]: https://github.com/tiehuis/zig-bn/tree/master/bench/facdiv/crate-facdiv-rs
2018-05-14 11:24:32 -07:00
Josh Stone
087c4ecfd6 Add serde tests 2018-05-03 12:39:15 -07:00
Josh Stone
12498b20fa bump to num-traits 0.2.1 2018-03-02 21:07:22 -08:00
Josh Stone
e89c48081f Update rand and serde; drop rustc-serialize 2018-02-24 01:28:57 -08:00
Josh Stone
089b86a513 Start the bump to 0.2 2018-02-23 17:22:12 -08:00
Josh Stone
ef0b1041df Release 0.1.43 2018-02-08 17:32:57 -08:00
Josh Stone
a7bd6a0f4b Release 0.1.42 2018-02-07 22:42:51 -08:00
Josh Stone
8893408c30 add a gcd benchmark 2018-02-07 21:56:28 -08:00
Igor Gnatenko
39b88b41d2 Relax rand version
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-01-01 12:13:37 +01:00
Josh Stone
5918a72299 Add [[bench]] details 2017-12-18 17:29:34 -08:00
Josh Stone
6a41eaa46f Move num-bigint to its own repo
All the prior `num` history is kept, so old `num-bigint` tags are still
valid, but future development here will be just for `num-bigint`.
2017-12-17 15:44:53 -08:00
Josh Stone
c24f76781b num: bump to 0.1.41
Syncing the metacrate to the latest of all subcrates.
2017-12-01 13:31:33 -08:00
Martin Geisler
97bc42854a Add CI badge 2017-07-25 00:17:17 +02:00
Josh Stone
23d1ab689d num: bump to 0.1.40 2017-07-14 17:42:00 -07:00
Keith Wansbrough
c87faf46a6 Tweak categories based on review. 2017-07-11 09:47:15 +01:00
Keith Wansbrough
eddcb54d6b Add cargo keywords and categories.
Resolves #306. Suggestions welcome for better keywords/categories, though there is a limit of 5 of each.
2017-07-11 09:47:15 +01:00
Josh Stone
b1b034f438 num: bump to 0.1.39 2017-06-09 11:03:50 -07:00
Josh Stone
7bf9a6ccf2 num: bump to 0.1.38 2017-06-08 23:53:47 -07:00
Josh Stone
66ce252494 Bump versions in the num collection 2017-02-26 14:18:33 -08:00
Josh Stone
f25a3bd51d 0.1.36 bump for num, traits, macros, and the new derive 2016-09-29 23:31:23 -07:00