rust ffast-math (defunct, use lower)
-rw-r--r--src/lib.rs4
-rw-r--r--src/trait.rs4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f077f2e..fee4937 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -176,9 +176,7 @@ impl<T: FastFloat> PartialEq<T> for FFloat<T> {
impl<T: FastFloat> Eq for FFloat<T> {}
impl<T: FastFloat> PartialOrd for FFloat<T> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
- self.check();
- other.check();
- Some(unsafe { self.0.partial_cmp(&other.0).unwrap_unchecked() })
+ Some(self.cmp(other))
}
}
impl<T: FastFloat> PartialOrd<T> for FFloat<T> {
diff --git a/src/trait.rs b/src/trait.rs
index 96e19c9..74b0a5a 100644
--- a/src/trait.rs
+++ b/src/trait.rs
@@ -10,7 +10,7 @@ macro_rules! meth {
}
impl FastFloat for f32 {
- $(unsafe fn $name(a: Self, b: Self) -> Self {
+ $(#[inline(always)] unsafe fn $name(a: Self, b: Self) -> Self {
$name(a, b)
})+
@@ -19,7 +19,7 @@ macro_rules! meth {
}
impl FastFloat for f64 {
- $(unsafe fn $name(a: Self, b: Self) -> Self {
+ $(#[inline(always)] unsafe fn $name(a: Self, b: Self) -> Self {
$name(a, b)
})+