Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 110c6f7

Browse files
committed
Rename generic abs to fabs
Using the same name as the routines themselves means this will correctly get picked up by the CI job looking for exhaustive tests.
1 parent 0cb855b commit 110c6f7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/math/fabs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn fabs(x: f64) -> f64 {
99
args: x,
1010
}
1111

12-
super::generic::abs(x)
12+
super::generic::fabs(x)
1313
}
1414

1515
#[cfg(test)]

src/math/fabsf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn fabsf(x: f32) -> f32 {
99
args: x,
1010
}
1111

12-
super::generic::abs(x)
12+
super::generic::fabs(x)
1313
}
1414

1515
// PowerPC tests are failing on LLVM 13: https://github.com/rust-lang/rust/issues/88520
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::super::Float;
22

33
/// Absolute value.
4-
pub fn abs<F: Float>(x: F) -> F {
4+
pub fn fabs<F: Float>(x: F) -> F {
55
x.abs()
66
}

src/math/generic/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mod abs;
21
mod copysign;
2+
mod fabs;
33

4-
pub use abs::abs;
54
pub use copysign::copysign;
5+
pub use fabs::fabs;

0 commit comments

Comments
 (0)