Skip to content

Change copytest parameter name from y to sign #59745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/libstd/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ impl f32 {
}

/// Returns a number composed of the magnitude of `self` and the sign of
/// `y`.
/// `sign`.
///
/// Equal to `self` if the sign of `self` and `y` are the same, otherwise
/// Equal to `self` if the sign of `self` and `sign` are the same, otherwise
/// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
/// `y` is returned.
/// `sign` is returned.
///
/// # Examples
///
Expand All @@ -216,8 +216,8 @@ impl f32 {
#[inline]
#[must_use]
#[stable(feature = "copysign", since = "1.35.0")]
pub fn copysign(self, y: f32) -> f32 {
unsafe { intrinsics::copysignf32(self, y) }
pub fn copysign(self, sign: f32) -> f32 {
unsafe { intrinsics::copysignf32(self, sign) }
}

/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
Expand Down
10 changes: 5 additions & 5 deletions src/libstd/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ impl f64 {
}

/// Returns a number composed of the magnitude of `self` and the sign of
/// `y`.
/// `sign`.
///
/// Equal to `self` if the sign of `self` and `y` are the same, otherwise
/// Equal to `self` if the sign of `self` and `sign` are the same, otherwise
/// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
/// `y` is returned.
/// `sign` is returned.
///
/// # Examples
///
Expand All @@ -194,8 +194,8 @@ impl f64 {
#[inline]
#[must_use]
#[stable(feature = "copysign", since = "1.35.0")]
pub fn copysign(self, y: f64) -> f64 {
unsafe { intrinsics::copysignf64(self, y) }
pub fn copysign(self, sign: f64) -> f64 {
unsafe { intrinsics::copysignf64(self, sign) }
}

/// Fused multiply-add. Computes `(self * a) + b` with only one rounding
Expand Down