-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
BTryFrom
trait, change to #[derive(PartialEq, Eq)]
- Loading branch information
1 parent
ca1b6fe
commit 28283d3
Showing
22 changed files
with
275 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: codecov report | ||
|
||
on: | ||
pull_request: | ||
branches: "**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
codecov: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
run: rustup update nightly | ||
- name: Set nightly as default | ||
run: rustup default nightly | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Generate code coverage | ||
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
fail_ci_if_error: true |
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,14 +1,14 @@ | ||
name: Publish dry run | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
publish_dry_run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: publish dry run | ||
run: cargo publish --dry-run | ||
publish_dry_run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: publish dry run | ||
run: cargo publish --dry-run |
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,17 +1,17 @@ | ||
name: Publish to crates.io | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
#test: | ||
# uses: ./.github/workflows/test.yml | ||
publish: | ||
#needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: publish | ||
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} | ||
#test: | ||
# uses: ./.github/workflows/test.yml | ||
publish: | ||
#needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: publish | ||
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- `<= v0.1.0`: incorrect implementation of `from_be`, `to_be` on all integers. | ||
- `<= v0.8.0`: `unchecked_shl`, `unchecked_shr` (only for `BUint` with `64` bit digits). | ||
- `<= v0.8.0`: incorrect implementation of `Add<$Digit>` for all `BUint`s (where `$Digit` is the underlying digit type). | ||
- `<= v0.8.0`: `lcm` incorrectly panics when `self` is zero. |
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 |
---|---|---|
@@ -1,30 +1,3 @@ | ||
|
||
fn main() { | ||
// let a: u128 = x324534; | ||
// let a = lit_parser::n!(x234987234x24); | ||
// println!("{}", a); | ||
for i in 126..=126 { | ||
println!("{}, {}", log10_2e(i), 2.0f64.powi(i as i32).log10().floor()); | ||
} | ||
} | ||
|
||
fn log10_2e(e: u128) -> u128 { | ||
let mut pow = 0; | ||
let mut current_pow = 0; | ||
let mut mod10 = 1; | ||
for i in 0..e { | ||
mod10 *= 2; | ||
if mod10 >= 10 { | ||
current_pow += 1; | ||
mod10 %= 10; | ||
if current_pow > pow { | ||
pow = current_pow; | ||
current_pow = 0; | ||
} | ||
} | ||
// println!("{}", mod10); | ||
// println!("{}", current_pow); | ||
// println!("{}\n", pow); | ||
} | ||
pow | ||
} |
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,10 +1,10 @@ | ||
export QUICKCHECK_TESTS=1000000 | ||
while true | ||
do | ||
RUSTFLAGS="--cfg test_int_bits=\"$1\"" cargo test quickcheck_ --quiet --features="$2 rand numtraits nightly" | ||
clear && printf '\e[3J' | ||
if [ $? -ne 0 ] | ||
then | ||
exit 1 | ||
fi | ||
RUSTFLAGS="--cfg test_int_bits=\"$1\"" cargo test quickcheck_ --quiet --features="$2 rand numtraits nightly" | ||
clear && printf '\e[3J' | ||
if [ $? -ne 0 ] | ||
then | ||
exit 1 | ||
fi | ||
done |
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
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.