Skip to content

Commit 9a2e702

Browse files
committed
Fix inconsistent documentation
I improved the f32 version and made a copy-paste error for f64.
1 parent 0e6c3f2 commit 9a2e702

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/libstd/f32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ impl f32 {
221221
/// assert!(f32::NAN.copysign(1.0).is_nan());
222222
/// ```
223223
#[inline]
224-
#[unstable(feature="copysign", issue="0")]
224+
#[unstable(feature="copysign", issue="55169")]
225225
pub fn copysign(self, y: f32) -> f32 {
226226
unsafe { intrinsics::copysignf32(self, y) }
227227
}

src/libstd/f64.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ impl f64 {
177177
}
178178

179179
/// Returns a number composed of the magnitude of one number and the sign of
180-
/// another, or `NAN` if the number is `NAN`.
180+
/// another.
181181
///
182182
/// Equal to `self` if the sign of `self` and `y` are the same, otherwise
183-
/// equal to `-y`.
183+
/// equal to `-y`. If `self` is a `NAN`, then a `NAN` with the sign of `y`
184+
/// is returned.
184185
///
185186
/// # Examples
186187
///
@@ -198,7 +199,7 @@ impl f64 {
198199
/// assert!(f64::NAN.copysign(1.0).is_nan());
199200
/// ```
200201
#[inline]
201-
#[unstable(feature="copysign", issue="0")]
202+
#[unstable(feature="copysign", issue="55169")]
202203
pub fn copysign(self, y: f64) -> f64 {
203204
unsafe { intrinsics::copysignf64(self, y) }
204205
}

0 commit comments

Comments
 (0)