Skip to content

Commit e5d5006

Browse files
committed
Update docs
1 parent 5b5b259 commit e5d5006

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

crates/std_float/src/lib.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use crate::sealed::Sealed;
4444
/// For now this trait is available to permit experimentation with SIMD float
4545
/// operations that may lack hardware support, such as `mul_add`.
4646
pub trait StdFloat: Sealed + Sized {
47-
/// Fused multiply-add. Computes `(self * a) + b` with only one rounding error,
47+
/// Elementwise fused multiply-add. Computes `(self * a) + b` with only one rounding error,
4848
/// yielding a more accurate result than an unfused multiply-add.
4949
///
5050
/// Using `mul_add` *may* be more performant than an unfused multiply-add if the target
@@ -57,87 +57,87 @@ pub trait StdFloat: Sealed + Sized {
5757
unsafe { intrinsics::simd_fma(self, a, b) }
5858
}
5959

60-
/// Produces a vector where every lane has the square root value
61-
/// of the equivalently-indexed lane in `self`
60+
/// Produces a vector where every element has the square root value
61+
/// of the equivalently-indexed element in `self`
6262
#[inline]
6363
#[must_use = "method returns a new vector and does not mutate the original value"]
6464
fn sqrt(self) -> Self {
6565
unsafe { intrinsics::simd_fsqrt(self) }
6666
}
6767

68-
/// Produces a vector where every lane has the sine of the value
69-
/// in the equivalently-indexed lane in `self`.
68+
/// Produces a vector where every element has the sine of the value
69+
/// in the equivalently-indexed element in `self`.
7070
#[inline]
7171
#[must_use = "method returns a new vector and does not mutate the original value"]
7272
fn sin(self) -> Self {
7373
unsafe { intrinsics::simd_fsin(self) }
7474
}
7575

76-
/// Produces a vector where every lane has the cosine of the value
77-
/// in the equivalently-indexed lane in `self`.
76+
/// Produces a vector where every element has the cosine of the value
77+
/// in the equivalently-indexed element in `self`.
7878
#[inline]
7979
#[must_use = "method returns a new vector and does not mutate the original value"]
8080
fn cos(self) -> Self {
8181
unsafe { intrinsics::simd_fcos(self) }
8282
}
8383

84-
/// Produces a vector where every lane has the exponential (base e) of the value
85-
/// in the equivalently-indexed lane in `self`.
84+
/// Produces a vector where every element has the exponential (base e) of the value
85+
/// in the equivalently-indexed element in `self`.
8686
#[inline]
8787
#[must_use = "method returns a new vector and does not mutate the original value"]
8888
fn exp(self) -> Self {
8989
unsafe { intrinsics::simd_fexp(self) }
9090
}
9191

92-
/// Produces a vector where every lane has the exponential (base 2) of the value
93-
/// in the equivalently-indexed lane in `self`.
92+
/// Produces a vector where every element has the exponential (base 2) of the value
93+
/// in the equivalently-indexed element in `self`.
9494
#[inline]
9595
#[must_use = "method returns a new vector and does not mutate the original value"]
9696
fn exp2(self) -> Self {
9797
unsafe { intrinsics::simd_fexp2(self) }
9898
}
9999

100-
/// Produces a vector where every lane has the natural logarithm of the value
101-
/// in the equivalently-indexed lane in `self`.
100+
/// Produces a vector where every element has the natural logarithm of the value
101+
/// in the equivalently-indexed element in `self`.
102102
#[inline]
103103
#[must_use = "method returns a new vector and does not mutate the original value"]
104104
fn ln(self) -> Self {
105105
unsafe { intrinsics::simd_flog(self) }
106106
}
107107

108-
/// Produces a vector where every lane has the logarithm with respect to an arbitrary
109-
/// in the equivalently-indexed lanes in `self` and `base`.
108+
/// Produces a vector where every element has the logarithm with respect to an arbitrary
109+
/// in the equivalently-indexed elements in `self` and `base`.
110110
#[inline]
111111
#[must_use = "method returns a new vector and does not mutate the original value"]
112112
fn log(self, base: Self) -> Self {
113113
unsafe { intrinsics::simd_div(self.ln(), base.ln()) }
114114
}
115115

116116

117-
/// Produces a vector where every lane has the base-2 logarithm of the value
118-
/// in the equivalently-indexed lane in `self`.
117+
/// Produces a vector where every element has the base-2 logarithm of the value
118+
/// in the equivalently-indexed element in `self`.
119119
#[inline]
120120
#[must_use = "method returns a new vector and does not mutate the original value"]
121121
fn log2(self) -> Self {
122122
unsafe { intrinsics::simd_flog2(self) }
123123
}
124124

125-
/// Produces a vector where every lane has the base-10 logarithm of the value
126-
/// in the equivalently-indexed lane in `self`.
125+
/// Produces a vector where every element has the base-10 logarithm of the value
126+
/// in the equivalently-indexed element in `self`.
127127
#[inline]
128128
#[must_use = "method returns a new vector and does not mutate the original value"]
129129
fn log10(self) -> Self {
130130
unsafe { intrinsics::simd_flog10(self) }
131131
}
132132

133-
/// Returns the smallest integer greater than or equal to each lane.
133+
/// Returns the smallest integer greater than or equal to each element.
134134
#[must_use = "method returns a new vector and does not mutate the original value"]
135135
#[inline]
136136
fn ceil(self) -> Self {
137137
unsafe { intrinsics::simd_ceil(self) }
138138
}
139139

140-
/// Returns the largest integer value less than or equal to each lane.
140+
/// Returns the largest integer value less than or equal to each element.
141141
#[must_use = "method returns a new vector and does not mutate the original value"]
142142
#[inline]
143143
fn floor(self) -> Self {

0 commit comments

Comments
 (0)