Skip to content

Commit 523c8ca

Browse files
committed
Change the multiprec_ prefix to mp_
Currently there is a combination of names starting with `multiprecision_`, `mp_` and `multiprec_`. Update so `multiprecision_` is always used when a long form makes sense, `mp_` otherwise (eliminating `multiprec_`).
1 parent 2a52f32 commit 523c8ca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/libm-test/src/precision.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub struct SpecialCase;
1515
const MUSL_DEFAULT_ULP: u32 = 2;
1616

1717
/// Default ULP allowed to differ from multiprecision (i.e. infinite) results.
18-
const MULTIPREC_DEFAULT_ULP: u32 = 1;
18+
const MP_DEFAULT_ULP: u32 = 1;
1919

2020
/// ULP allowed to differ from the results returned by a test basis.
2121
///
@@ -52,7 +52,7 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
5252

5353
// Defaults
5454
(Musl, _) => MUSL_DEFAULT_ULP,
55-
(Mpfr, _) => MULTIPREC_DEFAULT_ULP,
55+
(Mpfr, _) => MP_DEFAULT_ULP,
5656
}
5757
}
5858

crates/libm-test/tests/multiprecision.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ use libm_test::mpfloat::MpOp;
77
use libm_test::{CheckBasis, CheckCtx, CheckOutput, GenerateInput, MathOp, TupleCall};
88

99
/// Implement a test against MPFR with random inputs.
10-
macro_rules! multiprec_rand_tests {
10+
macro_rules! mp_rand_tests {
1111
(
1212
fn_name: $fn_name:ident,
1313
attrs: [$($meta:meta)*]
1414
) => {
1515
paste::paste! {
1616
#[test]
1717
$(#[$meta])*
18-
fn [< multiprec_random_ $fn_name >]() {
18+
fn [< mp_random_ $fn_name >]() {
1919
test_one::<libm_test::op::$fn_name::Routine>();
2020
}
2121
}
@@ -40,7 +40,7 @@ where
4040
}
4141

4242
libm_macros::for_each_function! {
43-
callback: multiprec_rand_tests,
43+
callback: mp_rand_tests,
4444
attributes: [
4545
// Also an assertion failure on i686: at `MPFR_ASSERTN (! mpfr_erangeflag_p ())`
4646
#[ignore = "large values are infeasible in MPFR"]

0 commit comments

Comments
 (0)