forked from txpipe/pallas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(math): add support for some math functions (txpipe#483)
- Loading branch information
1 parent
3dbd582
commit 2c69435
Showing
9 changed files
with
201,959 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,19 @@ license = "Apache-2.0" | |
readme = "README.md" | ||
authors = ["Andrew Westberg <[email protected]>"] | ||
|
||
[features] | ||
default = ["gmp"] | ||
gmp = ["dep:gmp-mpfr-sys"] | ||
num = ["dep:num-bigint", "dep:num-integer", "dep:num-traits"] | ||
|
||
[dependencies] | ||
# rug = "1.24.1" | ||
gmp-mpfr-sys = { version = "1.6.4", features = ["mpc"], default-features = false, optional = true } | ||
once_cell = "1.19.0" | ||
num-bigint = { version = "0.4.6", optional = true } | ||
num-integer = { version = "0.1.46", optional = true } | ||
num-traits = { version = "0.2.19", optional = true } | ||
regex = "1.10.5" | ||
thiserror = "1.0.61" | ||
|
||
[dev-dependencies] | ||
quickcheck = "1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
pub mod math; | ||
|
||
// Ensure only one of `gmp` or `num` is enabled, not both. | ||
#[cfg(all(feature = "gmp", feature = "num"))] | ||
compile_error!("Features `gmp` and `num` are mutually exclusive."); | ||
|
||
#[cfg(all(not(feature = "gmp"), not(feature = "num")))] | ||
compile_error!("One of the features `gmp` or `num` must be enabled."); | ||
|
||
#[cfg(feature = "gmp")] | ||
pub mod math_gmp; | ||
|
||
#[cfg(feature = "num")] | ||
pub mod math_num; |
Oops, something went wrong.