Skip to content

Commit b33ee72

Browse files
committed
Rename to algebraic_* to match checked_*().
Requested by @tgross35 here: rust-lang/libs-team#532 (comment)
1 parent bab448a commit b33ee72

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

library/core/src/intrinsics/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2995,7 +2995,7 @@ pub unsafe fn float_to_int_unchecked<Float: Copy, Int: Copy>(_value: Float) -> I
29952995

29962996
/// Float addition that allows optimizations based on algebraic rules.
29972997
///
2998-
/// Stabilized as [`f16::add_algebraic`], [`f32::add_algebraic`], [`f64::add_algebraic`] and [`f128::add_algebraic`].
2998+
/// Stabilized as [`f16::algebraic_add`], [`f32::algebraic_add`], [`f64::algebraic_add`] and [`f128::algebraic_add`].
29992999
#[rustc_nounwind]
30003000
#[rustc_intrinsic]
30013001
#[rustc_intrinsic_must_be_overridden]
@@ -3005,7 +3005,7 @@ pub fn fadd_algebraic<T: Copy>(_a: T, _b: T) -> T {
30053005

30063006
/// Float subtraction that allows optimizations based on algebraic rules.
30073007
///
3008-
/// Stabilized as [`f16::sub_algebraic`], [`f32::sub_algebraic`], [`f64::sub_algebraic`] and [`f128::sub_algebraic`].
3008+
/// Stabilized as [`f16::algebraic_sub`], [`f32::algebraic_sub`], [`f64::algebraic_sub`] and [`f128::algebraic_sub`].
30093009
#[rustc_nounwind]
30103010
#[rustc_intrinsic]
30113011
#[rustc_intrinsic_must_be_overridden]
@@ -3015,7 +3015,7 @@ pub fn fsub_algebraic<T: Copy>(_a: T, _b: T) -> T {
30153015

30163016
/// Float multiplication that allows optimizations based on algebraic rules.
30173017
///
3018-
/// Stabilized as [`f16::mul_algebraic`], [`f32::mul_algebraic`], [`f64::mul_algebraic`] and [`f128::mul_algebraic`].
3018+
/// Stabilized as [`f16::algebraic_mul`], [`f32::algebraic_mul`], [`f64::algebraic_mul`] and [`f128::algebraic_mul`].
30193019
#[rustc_nounwind]
30203020
#[rustc_intrinsic]
30213021
#[rustc_intrinsic_must_be_overridden]
@@ -3025,7 +3025,7 @@ pub fn fmul_algebraic<T: Copy>(_a: T, _b: T) -> T {
30253025

30263026
/// Float division that allows optimizations based on algebraic rules.
30273027
///
3028-
/// Stabilized as [`f16::div_algebraic`], [`f32::div_algebraic`], [`f64::div_algebraic`] and [`f128::div_algebraic`].
3028+
/// Stabilized as [`f16::algebraic_div`], [`f32::algebraic_div`], [`f64::algebraic_div`] and [`f128::algebraic_div`].
30293029
#[rustc_nounwind]
30303030
#[rustc_intrinsic]
30313031
#[rustc_intrinsic_must_be_overridden]
@@ -3035,7 +3035,7 @@ pub fn fdiv_algebraic<T: Copy>(_a: T, _b: T) -> T {
30353035

30363036
/// Float remainder that allows optimizations based on algebraic rules.
30373037
///
3038-
/// Stabilized as [`f16::rem_algebraic`], [`f32::rem_algebraic`], [`f64::rem_algebraic`] and [`f128::rem_algebraic`].
3038+
/// Stabilized as [`f16::algebraic_rem`], [`f32::algebraic_rem`], [`f64::algebraic_rem`] and [`f128::algebraic_rem`].
30393039
#[rustc_nounwind]
30403040
#[rustc_intrinsic]
30413041
#[rustc_intrinsic_must_be_overridden]

library/core/src/num/f128.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ impl f128 {
13721372
#[must_use = "method returns a new number and does not mutate the original value"]
13731373
#[unstable(feature = "float_algebraic", issue = "136469")]
13741374
#[inline]
1375-
pub fn add_algebraic(self, rhs: f128) -> f128 {
1375+
pub fn algebraic_add(self, rhs: f128) -> f128 {
13761376
intrinsics::fadd_algebraic(self, rhs)
13771377
}
13781378

@@ -1382,7 +1382,7 @@ impl f128 {
13821382
#[must_use = "method returns a new number and does not mutate the original value"]
13831383
#[unstable(feature = "float_algebraic", issue = "136469")]
13841384
#[inline]
1385-
pub fn sub_algebraic(self, rhs: f128) -> f128 {
1385+
pub fn algebraic_sub(self, rhs: f128) -> f128 {
13861386
intrinsics::fsub_algebraic(self, rhs)
13871387
}
13881388

@@ -1392,7 +1392,7 @@ impl f128 {
13921392
#[must_use = "method returns a new number and does not mutate the original value"]
13931393
#[unstable(feature = "float_algebraic", issue = "136469")]
13941394
#[inline]
1395-
pub fn mul_algebraic(self, rhs: f128) -> f128 {
1395+
pub fn algebraic_mul(self, rhs: f128) -> f128 {
13961396
intrinsics::fmul_algebraic(self, rhs)
13971397
}
13981398

@@ -1402,7 +1402,7 @@ impl f128 {
14021402
#[must_use = "method returns a new number and does not mutate the original value"]
14031403
#[unstable(feature = "float_algebraic", issue = "136469")]
14041404
#[inline]
1405-
pub fn div_algebraic(self, rhs: f128) -> f128 {
1405+
pub fn algebraic_div(self, rhs: f128) -> f128 {
14061406
intrinsics::fdiv_algebraic(self, rhs)
14071407
}
14081408

@@ -1412,7 +1412,7 @@ impl f128 {
14121412
#[must_use = "method returns a new number and does not mutate the original value"]
14131413
#[unstable(feature = "float_algebraic", issue = "136469")]
14141414
#[inline]
1415-
pub fn rem_algebraic(self, rhs: f128) -> f128 {
1415+
pub fn algebraic_rem(self, rhs: f128) -> f128 {
14161416
intrinsics::frem_algebraic(self, rhs)
14171417
}
14181418
}

library/core/src/num/f16.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ impl f16 {
13481348
#[must_use = "method returns a new number and does not mutate the original value"]
13491349
#[unstable(feature = "float_algebraic", issue = "136469")]
13501350
#[inline]
1351-
pub fn add_algebraic(self, rhs: f16) -> f16 {
1351+
pub fn algebraic_add(self, rhs: f16) -> f16 {
13521352
intrinsics::fadd_algebraic(self, rhs)
13531353
}
13541354

@@ -1358,7 +1358,7 @@ impl f16 {
13581358
#[must_use = "method returns a new number and does not mutate the original value"]
13591359
#[unstable(feature = "float_algebraic", issue = "136469")]
13601360
#[inline]
1361-
pub fn sub_algebraic(self, rhs: f16) -> f16 {
1361+
pub fn algebraic_sub(self, rhs: f16) -> f16 {
13621362
intrinsics::fsub_algebraic(self, rhs)
13631363
}
13641364

@@ -1368,7 +1368,7 @@ impl f16 {
13681368
#[must_use = "method returns a new number and does not mutate the original value"]
13691369
#[unstable(feature = "float_algebraic", issue = "136469")]
13701370
#[inline]
1371-
pub fn mul_algebraic(self, rhs: f16) -> f16 {
1371+
pub fn algebraic_mul(self, rhs: f16) -> f16 {
13721372
intrinsics::fmul_algebraic(self, rhs)
13731373
}
13741374

@@ -1378,7 +1378,7 @@ impl f16 {
13781378
#[must_use = "method returns a new number and does not mutate the original value"]
13791379
#[unstable(feature = "float_algebraic", issue = "136469")]
13801380
#[inline]
1381-
pub fn div_algebraic(self, rhs: f16) -> f16 {
1381+
pub fn algebraic_div(self, rhs: f16) -> f16 {
13821382
intrinsics::fdiv_algebraic(self, rhs)
13831383
}
13841384

@@ -1388,7 +1388,7 @@ impl f16 {
13881388
#[must_use = "method returns a new number and does not mutate the original value"]
13891389
#[unstable(feature = "float_algebraic", issue = "136469")]
13901390
#[inline]
1391-
pub fn rem_algebraic(self, rhs: f16) -> f16 {
1391+
pub fn algebraic_rem(self, rhs: f16) -> f16 {
13921392
intrinsics::frem_algebraic(self, rhs)
13931393
}
13941394
}

library/core/src/num/f32.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ impl f32 {
15131513
#[must_use = "method returns a new number and does not mutate the original value"]
15141514
#[unstable(feature = "float_algebraic", issue = "136469")]
15151515
#[inline]
1516-
pub fn add_algebraic(self, rhs: f32) -> f32 {
1516+
pub fn algebraic_add(self, rhs: f32) -> f32 {
15171517
intrinsics::fadd_algebraic(self, rhs)
15181518
}
15191519

@@ -1523,7 +1523,7 @@ impl f32 {
15231523
#[must_use = "method returns a new number and does not mutate the original value"]
15241524
#[unstable(feature = "float_algebraic", issue = "136469")]
15251525
#[inline]
1526-
pub fn sub_algebraic(self, rhs: f32) -> f32 {
1526+
pub fn algebraic_sub(self, rhs: f32) -> f32 {
15271527
intrinsics::fsub_algebraic(self, rhs)
15281528
}
15291529

@@ -1533,7 +1533,7 @@ impl f32 {
15331533
#[must_use = "method returns a new number and does not mutate the original value"]
15341534
#[unstable(feature = "float_algebraic", issue = "136469")]
15351535
#[inline]
1536-
pub fn mul_algebraic(self, rhs: f32) -> f32 {
1536+
pub fn algebraic_mul(self, rhs: f32) -> f32 {
15371537
intrinsics::fmul_algebraic(self, rhs)
15381538
}
15391539

@@ -1543,7 +1543,7 @@ impl f32 {
15431543
#[must_use = "method returns a new number and does not mutate the original value"]
15441544
#[unstable(feature = "float_algebraic", issue = "136469")]
15451545
#[inline]
1546-
pub fn div_algebraic(self, rhs: f32) -> f32 {
1546+
pub fn algebraic_div(self, rhs: f32) -> f32 {
15471547
intrinsics::fdiv_algebraic(self, rhs)
15481548
}
15491549

@@ -1553,7 +1553,7 @@ impl f32 {
15531553
#[must_use = "method returns a new number and does not mutate the original value"]
15541554
#[unstable(feature = "float_algebraic", issue = "136469")]
15551555
#[inline]
1556-
pub fn rem_algebraic(self, rhs: f32) -> f32 {
1556+
pub fn algebraic_rem(self, rhs: f32) -> f32 {
15571557
intrinsics::frem_algebraic(self, rhs)
15581558
}
15591559
}

library/core/src/num/f64.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ impl f64 {
15131513
#[must_use = "method returns a new number and does not mutate the original value"]
15141514
#[unstable(feature = "float_algebraic", issue = "136469")]
15151515
#[inline]
1516-
pub fn add_algebraic(self, rhs: f64) -> f64 {
1516+
pub fn algebraic_add(self, rhs: f64) -> f64 {
15171517
intrinsics::fadd_algebraic(self, rhs)
15181518
}
15191519

@@ -1523,7 +1523,7 @@ impl f64 {
15231523
#[must_use = "method returns a new number and does not mutate the original value"]
15241524
#[unstable(feature = "float_algebraic", issue = "136469")]
15251525
#[inline]
1526-
pub fn sub_algebraic(self, rhs: f64) -> f64 {
1526+
pub fn algebraic_sub(self, rhs: f64) -> f64 {
15271527
intrinsics::fsub_algebraic(self, rhs)
15281528
}
15291529

@@ -1533,7 +1533,7 @@ impl f64 {
15331533
#[must_use = "method returns a new number and does not mutate the original value"]
15341534
#[unstable(feature = "float_algebraic", issue = "136469")]
15351535
#[inline]
1536-
pub fn mul_algebraic(self, rhs: f64) -> f64 {
1536+
pub fn algebraic_mul(self, rhs: f64) -> f64 {
15371537
intrinsics::fmul_algebraic(self, rhs)
15381538
}
15391539

@@ -1543,7 +1543,7 @@ impl f64 {
15431543
#[must_use = "method returns a new number and does not mutate the original value"]
15441544
#[unstable(feature = "float_algebraic", issue = "136469")]
15451545
#[inline]
1546-
pub fn div_algebraic(self, rhs: f64) -> f64 {
1546+
pub fn algebraic_div(self, rhs: f64) -> f64 {
15471547
intrinsics::fdiv_algebraic(self, rhs)
15481548
}
15491549

@@ -1553,7 +1553,7 @@ impl f64 {
15531553
#[must_use = "method returns a new number and does not mutate the original value"]
15541554
#[unstable(feature = "float_algebraic", issue = "136469")]
15551555
#[inline]
1556-
pub fn rem_algebraic(self, rhs: f64) -> f64 {
1556+
pub fn algebraic_rem(self, rhs: f64) -> f64 {
15571557
intrinsics::frem_algebraic(self, rhs)
15581558
}
15591559
}

0 commit comments

Comments
 (0)