Skip to content

Commit

Permalink
Merge pull request #18 from thomwiggers/bump-version
Browse files Browse the repository at this point in the history
Bump to version 0.4.0
  • Loading branch information
thomwiggers authored Nov 23, 2023
2 parents 72cc88b + 69841d9 commit 5548314
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
== 0.3.0 ==
== 0.4.0 ==

* Fixed a bug (#16) in the implementation which meant that Factorials 37!, 1200!, and possibly others were not computed correctly.
* Thanks to @marcantoinem for stepping up with the bugfix in (#17)

== 0.3.0 (YANKED) ==

* Implement Prime Swing algorithm, which should massively improve performance, especially for larger factorials. (#9)
Thanks a lot @marcantoinem!
Expand Down
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "factorial"
version = "0.3.0"
version = "0.4.0"
authors = ["Thom Wiggers <thom@thomwiggers.nl>"]
description = "Convenient methods to compute the factorial, optionally checked."
repository = "https://github.com/thomwiggers/factorial/"
Expand All @@ -16,15 +16,12 @@ maintenance = { status = "passively-maintained" }

[dependencies]
num-traits = "0.2"
primal-sieve = "0.3.5"
primal-sieve = "0.3.6"

[dev-dependencies]
num-bigint = "0.4"
criterion = { version = "0.5", features = ["html_reports"] }

[build-dependencies]
primal-sieve = "0.3.5"

[[bench]]
name = "benchmark"
harness = false
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
This crate provides some convenient and safe methods to compute the factorial with an efficient method. More precisely it uses the prime swing algorithm to compute the factorial. See [this paper](https://oeis.org/A000142/a000142.pdf) for more detail.
# Compute factorials

It can compute the factorial in `O(n (log n loglog n)^2)` operations of multiplication. The time complexity of this algorithm depends on the time complexity of the multiplication algorithm used.
This crate provides some convenient and safe methods to compute the factorial
with an efficient method. More precisely it uses the prime swing algorithm to
compute the factorial. See [this paper](https://oeis.org/A000142/a000142.pdf)
for more detail.

It can compute the factorial in `O(n (log n loglog n)^2)` operations of
multiplication. The time complexity of this algorithm depends on the time
complexity of the multiplication algorithm used.

0 comments on commit 5548314

Please sign in to comment.