Skip to content

Commit

Permalink
Integrate malachite-bigint to malachite repository
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Feb 14, 2025
1 parent 7da3f02 commit 950bf5d
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 235 deletions.
46 changes: 46 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ['malachite', 'malachite-base', 'malachite-float', 'malachite-nz', 'malachite-q', 'malachite-criterion-bench']
members = ['malachite', 'malachite-base', 'malachite-bigint', 'malachite-float', 'malachite-nz', 'malachite-q', 'malachite-criterion-bench']
resolver = "2"

[workspace.package]
Expand Down
22 changes: 0 additions & 22 deletions malachite-bigint/.github/workflows/rust.yml

This file was deleted.

2 changes: 0 additions & 2 deletions malachite-bigint/.gitignore

This file was deleted.

10 changes: 6 additions & 4 deletions malachite-bigint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
name = "malachite-bigint"
version = "0.5.0"
authors = ["Steve Shi <shikangzhi@gmail.com>"]
edition = "2021"
rust-version.workspace = true
edition.workspace = true
license = "LGPL-3.0-only"
description = "A drop-in num-bigint replacement based on malachite"
repository = "https://github.com/RustPython/malachite-bigint"
rust-version = "1.74.0"
repository = "https://github.com/mhogrefe/malachite"

[dependencies]
malachite = { version = "0.5.0", git = "https://github.com/mhogrefe/malachite.git" }
malachite-base = { version = "0.5.0", path = "../malachite-base" }
malachite-nz = { version = "0.5.0", path = "../malachite-nz" }

num-traits = { version = "0.2.19", default-features = false, features = ["i128"] }
num-integer = { version = "0.1.46", default-features = false, features = ["i128"] }
derive_more = { version = "1.0.0", features = ["display", "from", "into"] }
Expand Down
165 changes: 0 additions & 165 deletions malachite-bigint/LICENSE

This file was deleted.

24 changes: 11 additions & 13 deletions malachite-bigint/src/bigint.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
use derive_more::{Binary, Display, From, Into, LowerHex, Octal, UpperHex};
use malachite::{
base::{
num::{
arithmetic::traits::{
Abs, DivRem, DivRound, DivisibleBy, FloorRoot, Mod, Parity, UnsignedAbs,
},
conversion::traits::{RoundingInto, ToStringBase},
logic::traits::BitAccess,
use malachite_base::{
num::{
arithmetic::traits::{
Abs, DivRem, DivRound, DivisibleBy, FloorRoot, Mod, Parity, UnsignedAbs,
},
rounding_modes::RoundingMode,
conversion::traits::{RoundingInto, ToStringBase},
logic::traits::BitAccess,
},
Integer,
rounding_modes::RoundingMode,
};
use malachite_nz::integer::Integer;
use num_integer::Roots;
use num_traits::{
CheckedAdd, CheckedDiv, CheckedMul, CheckedSub, FromPrimitive, Num, One, Pow, Signed,
Expand Down Expand Up @@ -210,7 +208,7 @@ impl From<BigUint> for BigInt {
impl Zero for BigInt {
#[inline]
fn zero() -> Self {
Self(<Integer as malachite::base::num::basic::traits::Zero>::ZERO)
Self(<Integer as malachite_base::num::basic::traits::Zero>::ZERO)
}

#[inline]
Expand All @@ -222,7 +220,7 @@ impl Zero for BigInt {
impl One for BigInt {
#[inline]
fn one() -> Self {
Self(<Integer as malachite::base::num::basic::traits::One>::ONE)
Self(<Integer as malachite_base::num::basic::traits::One>::ONE)
}
}

Expand Down Expand Up @@ -516,7 +514,7 @@ impl BigInt {

#[inline]
pub fn sign(&self) -> Sign {
match <_ as malachite::base::num::arithmetic::traits::Sign>::sign(&self.0) {
match <_ as malachite_base::num::arithmetic::traits::Sign>::sign(&self.0) {
Ordering::Less => Minus,
Ordering::Equal => NoSign,
Ordering::Greater => Plus,
Expand Down
Loading

0 comments on commit 950bf5d

Please sign in to comment.