Skip to content

Commit

Permalink
added Float division
Browse files Browse the repository at this point in the history
  • Loading branch information
mhogrefe committed Sep 5, 2024
1 parent 3ff9605 commit 48e6f04
Show file tree
Hide file tree
Showing 141 changed files with 46,093 additions and 1,853 deletions.
52 changes: 26 additions & 26 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ edition = "2021"
rust-version = "1.74.0"

[workspace.dependencies]
malachite-base = { version = "0.4.15", path = 'malachite-base' }
malachite-nz = { version = "0.4.15", path = 'malachite-nz', default_features = false }
malachite-q = { version = "0.4.15", path = 'malachite-q' }
malachite-float = { version = "0.4.15", path = 'malachite-float' }
malachite-base = { version = "0.4.16", path = 'malachite-base' }
malachite-nz = { version = "0.4.16", path = 'malachite-nz', default_features = false }
malachite-q = { version = "0.4.16", path = 'malachite-q' }
malachite-float = { version = "0.4.16", path = 'malachite-float' }

[profile.release]
lto = "fat"
Expand Down
16 changes: 8 additions & 8 deletions additional-lints.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
('./malachite-base/src/num/exhaustive/mod.rs', 1074),
('./malachite-float/src/conversion/mantissa_and_exponent.rs', 452),
('./malachite-float/src/conversion/mantissa_and_exponent.rs', 641),
('./malachite-float/src/conversion/mod.rs', 225),
('./malachite-float/src/conversion/mod.rs', 227),
('./malachite-float/src/lib.rs', 24),
('./malachite-nz/src/integer/arithmetic/mod.rs', 39),
('./malachite-nz/src/integer/arithmetic/mod.rs', 40),
Expand All @@ -37,13 +37,13 @@
('./malachite-nz/src/natural/arithmetic/mod.rs', 46),
('./malachite-nz/src/natural/arithmetic/mod.rs', 47),
('./malachite-nz/src/natural/arithmetic/mod.rs', 48),
('./malachite-nz/src/natural/arithmetic/mod.rs', 154),
('./malachite-nz/src/natural/arithmetic/mod.rs', 155),
('./malachite-nz/src/natural/arithmetic/mod.rs', 178),
('./malachite-nz/src/natural/arithmetic/mod.rs', 179),
('./malachite-nz/src/natural/arithmetic/mod.rs', 180),
('./malachite-nz/src/natural/arithmetic/mod.rs', 563),
('./malachite-nz/src/natural/arithmetic/mod.rs', 565),
('./malachite-nz/src/natural/arithmetic/mod.rs', 158),
('./malachite-nz/src/natural/arithmetic/mod.rs', 159),
('./malachite-nz/src/natural/arithmetic/mod.rs', 182),
('./malachite-nz/src/natural/arithmetic/mod.rs', 183),
('./malachite-nz/src/natural/arithmetic/mod.rs', 184),
('./malachite-nz/src/natural/arithmetic/mod.rs', 567),
('./malachite-nz/src/natural/arithmetic/mod.rs', 569),
('./malachite-nz/src/natural/conversion/digits/power_of_2_digit_iterable.rs', 528),
('./malachite-nz/src/natural/conversion/digits/power_of_2_digit_iterable.rs', 530),
('./malachite-nz/src/natural/conversion/digits/power_of_2_digit_iterable.rs', 833),
Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</p>

Malachite is an arbitrary-precision arithmetic library for [Rust](https://www.rust-lang.org/). It
achieves high performance in part by using algorithms derived from [GMP](https://gmplib.org/) and
[FLINT](https://www.flintlib.org/).
achieves high performance in part by using algorithms derived from [GMP](https://gmplib.org/),
[FLINT](https://www.flintlib.org/), and [MPFR](https://www.mpfr.org/).

```rust
use malachite::num::arithmetic::traits::Factorial;
Expand Down Expand Up @@ -53,14 +53,14 @@ Malachite uses `no_std`, unless the `random`, `test_build`, or `bin_build` featu
To use Malachite, add the following to your project's `Cargo.toml` file:
```yaml
[dependencies.malachite]
version = "0.4.15"
version = "0.4.16"
```

By default, all of Malachite's features are included, but you can opt out of some of them. For
example, if you want to use `Natural` and `Integer` but not `Rational`, you can instead use
```yaml
[dependencies.malachite]
version = "0.4.15"
version = "0.4.16"
default-features = false
features = [ "naturals_and_integers" ]
```
Expand Down
2 changes: 1 addition & 1 deletion malachite-base/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "malachite-base"
version = "0.4.15"
version = "0.4.16"
authors = ["Mikhail Hogrefe <[email protected]>"]
rust-version.workspace = true
edition.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions malachite-base/src/bools/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ pub fn weighted_random_bools(
/// # Examples
/// ```
/// use malachite_base::bools::random::get_weighted_random_bool;
/// use malachite_base::num::random::variable_range_generator;
/// use malachite_base::num::random::VariableRangeGenerator;
/// use malachite_base::random::EXAMPLE_SEED;
///
/// assert_eq!(
/// get_weighted_random_bool(&mut variable_range_generator(EXAMPLE_SEED), 1, 10),
/// get_weighted_random_bool(&mut VariableRangeGenerator::new(EXAMPLE_SEED), 1, 10),
/// false
/// );
/// ```
Expand Down
20 changes: 10 additions & 10 deletions malachite-base/src/num/arithmetic/reciprocal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ macro_rules! impl_reciprocal {
/// Takes the reciprocal of a floating-point number.
///
/// $$
/// f(x) = 1/x+\epsilon.
/// f(x) = 1/x+\varepsilon.
/// $$
/// Let $p$ be the precision of the input float (typically 24 for `f32`s and 53 for
/// `f64`s, unless the float is subnormal).
/// - If $1/x$ is infinite, zero, or `NaN`, $\epsilon$ may be ignored or assumed to be
/// 0.
/// - If $1/x$ is finite and nonzero, and $m$ is not `Nearest`, then $|\epsilon| <
/// - If $1/x$ is infinite, zero, or `NaN`, $\varepsilon$ may be ignored or assumed to
/// be 0.
/// - If $1/x$ is finite and nonzero, and $m$ is not `Nearest`, then $|\varepsilon| <
/// 2^{\lfloor\log_2 |1/x|\rfloor-p+1}$.
/// - If $1/x$ is finite and nonzero, and $m$ is `Nearest`, then $|\epsilon| <
/// - If $1/x$ is finite and nonzero, and $m$ is `Nearest`, then $|\varepsilon| <
/// 2^{\lfloor\log_2 |1/x|\rfloor-p}$.
///
/// If the output has a precision, it is `prec`.
Expand All @@ -50,13 +50,13 @@ macro_rules! impl_reciprocal {
impl ReciprocalAssign for $t {
/// Takes the reciprocal of a floating-point number, in place.
///
/// $x \gets 1/x+\epsilon$. Let $p$ be the precision of the input float (typically 24
/// $x \gets 1/x+\varepsilon$. Let $p$ be the precision of the input float (typically 24
/// for `f32`s and 53 for `f64`s, unless the float is subnormal).
/// - If $1/x$ is infinite, zero, or `NaN`, $\epsilon$ may be ignored or assumed to be
/// 0.
/// - If $1/x$ is finite and nonzero, and $m$ is not `Nearest`, then $|\epsilon| <
/// - If $1/x$ is infinite, zero, or `NaN`, $\varepsilon$ may be ignored or assumed to
/// be 0.
/// - If $1/x$ is finite and nonzero, and $m$ is not `Nearest`, then $|\varepsilon| <
/// 2^{\lfloor\log_2 |1/x|\rfloor-p+1}$.
/// - If $1/x$ is finite and nonzero, and $m$ is `Nearest`, then $|\epsilon| <
/// - If $1/x$ is finite and nonzero, and $m$ is `Nearest`, then $|\varepsilon| <
/// 2^{\lfloor\log_2 |1/x|\rfloor-p}$.
///
/// See the `reciprocal` documentation for information on special cases.
Expand Down
4 changes: 2 additions & 2 deletions malachite-base/src/num/random/geometric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,12 +1450,12 @@ pub fn geometric_random_signed_inclusive_range<T: PrimitiveSigned>(
/// # Examples
/// ```
/// use malachite_base::num::random::geometric::get_geometric_random_signed_from_inclusive_range;
/// use malachite_base::num::random::variable_range_generator;
/// use malachite_base::num::random::VariableRangeGenerator;
/// use malachite_base::random::EXAMPLE_SEED;
///
/// assert_eq!(
/// get_geometric_random_signed_from_inclusive_range::<i8>(
/// &mut variable_range_generator(EXAMPLE_SEED),
/// &mut VariableRangeGenerator::new(EXAMPLE_SEED),
/// -100,
/// 99,
/// 30,
Expand Down
Loading

0 comments on commit 48e6f04

Please sign in to comment.