Use az exported from Rug

Since Rug 1.27.0, `az` is reexported. This means we no longer need to
track it as a separate dependency.
This commit is contained in:
Trevor Gross 2025-01-25 00:55:03 +00:00
parent 7c6c0c1b79
commit 62f0fd40d1
4 changed files with 5 additions and 7 deletions

View file

@ -12,7 +12,7 @@ unstable-float = ["libm/unstable-float", "rug?/nightly-float"]
# Generate tests which are random inputs and the outputs are calculated with
# musl libc.
build-mpfr = ["dep:az", "dep:rug", "dep:gmp-mpfr-sys"]
build-mpfr = ["dep:rug", "dep:gmp-mpfr-sys"]
# Build our own musl for testing and benchmarks
build-musl = ["dep:musl-math-sys"]
@ -28,7 +28,6 @@ short-benchmarks = []
[dependencies]
anyhow = "1.0.95"
az = { version = "1.2.1", optional = true }
gmp-mpfr-sys = { version = "1.6.4", optional = true, default-features = false, features = ["mpfr"] }
iai-callgrind = { version = "0.14.0", optional = true }
indicatif = { version = "0.17.9", default-features = false }

View file

@ -6,10 +6,10 @@
use std::cmp::Ordering;
use std::ffi::{c_int, c_long};
use az::Az;
use gmp_mpfr_sys::mpfr::rnd_t;
use rug::Assign;
pub use rug::Float as MpFloat;
use rug::az::{self, Az};
use rug::float::Round;
use rug::float::Round::Nearest;
use rug::ops::{PowAssignRound, RemAssignRound};

View file

@ -7,11 +7,10 @@ publish = false
[features]
default = ["build-musl", "build-mpfr", "unstable-float"]
build-musl = ["libm-test/build-musl", "dep:musl-math-sys"]
build-mpfr = ["libm-test/build-mpfr", "dep:az", "dep:rug"]
build-mpfr = ["libm-test/build-mpfr", "dep:rug"]
unstable-float = ["libm/unstable-float", "libm-test/unstable-float", "rug?/nightly-float"]
[dependencies]
az = { version = "1.2.1", optional = true }
libm = { path = "../..", default-features = false }
libm-macros = { path = "../libm-macros" }
libm-test = { path = "../libm-test", default-features = false }

View file

@ -8,12 +8,12 @@ use std::env;
use std::num::ParseIntError;
use std::str::FromStr;
#[cfg(feature = "build-mpfr")]
use az::Az;
use libm::support::{hf32, hf64};
#[cfg(feature = "build-mpfr")]
use libm_test::mpfloat::MpOp;
use libm_test::{MathOp, TupleCall};
#[cfg(feature = "build-mpfr")]
use rug::az::{self, Az};
const USAGE: &str = "\
usage: