// option. This file may not be copied, modified, or distributed
// except according to those terms.
-//! Operations and constants for 32-bits floats (`f32` type)
+//! This module provides constants which are specific to the implementation
+//! of the `f32` floating point data type.
+//!
+//! Mathematically significant numbers are provided in the `consts` sub-module.
+//!
+//! *[See also the `f32` primitive type](../../std/primitive.f32.html).*
#![stable(feature = "rust1", since = "1.0.0")]
// Since we do not support sNaN in Rust yet, we do not need to handle them.
// FIXME(nagisa): due to https://bugs.llvm.org/show_bug.cgi?id=33303 we canonicalize by
// multiplying by 1.0. Should switch to the `canonicalize` when it works.
- (if self < other || self.is_nan() { other } else { self }) * 1.0
+ (if self.is_nan() || self < other { other } else { self }) * 1.0
}
/// Returns the minimum of the two numbers.
// Since we do not support sNaN in Rust yet, we do not need to handle them.
// FIXME(nagisa): due to https://bugs.llvm.org/show_bug.cgi?id=33303 we canonicalize by
// multiplying by 1.0. Should switch to the `canonicalize` when it works.
- (if self < other || other.is_nan() { self } else { other }) * 1.0
+ (if other.is_nan() || self < other { self } else { other }) * 1.0
}
}