Skip to content

Commit 7a07a73

Browse files
committedApr 3, 2017
Replace ^ with <sup> html balise
1 parent 5309a3e commit 7a07a73

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed
 

Diff for: ‎src/libcore/intrinsics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1253,17 +1253,17 @@ extern "rust-intrinsic" {
12531253
#[cfg(not(stage0))]
12541254
pub fn unchecked_shr<T>(x: T, y: T) -> T;
12551255

1256-
/// Returns (a + b) mod 2^N, where N is the width of T in bits.
1256+
/// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.
12571257
/// The stabilized versions of this intrinsic are available on the integer
12581258
/// primitives via the `wrapping_add` method. For example,
12591259
/// [`std::u32::wrapping_add`](../../std/primitive.u32.html#method.wrapping_add)
12601260
pub fn overflowing_add<T>(a: T, b: T) -> T;
1261-
/// Returns (a - b) mod 2^N, where N is the width of T in bits.
1261+
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
12621262
/// The stabilized versions of this intrinsic are available on the integer
12631263
/// primitives via the `wrapping_sub` method. For example,
12641264
/// [`std::u32::wrapping_sub`](../../std/primitive.u32.html#method.wrapping_sub)
12651265
pub fn overflowing_sub<T>(a: T, b: T) -> T;
1266-
/// Returns (a * b) mod 2^N, where N is the width of T in bits.
1266+
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
12671267
/// The stabilized versions of this intrinsic are available on the integer
12681268
/// primitives via the `wrapping_mul` method. For example,
12691269
/// [`std::u32::wrapping_mul`](../../std/primitive.u32.html#method.wrapping_mul)

Diff for: ‎src/libcore/num/dec2flt/rawfp.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
//! Bit fiddling on positive IEEE 754 floats. Negative numbers aren't and needn't be handled.
1212
//! Normal floating point numbers have a canonical representation as (frac, exp) such that the
13-
//! value is 2^exp * (1 + sum(frac[N-i] / 2^i)) where N is the number of bits. Subnormals are
14-
//! slightly different and weird, but the same principle applies.
13+
//! value is 2<sup>exp</sup> * (1 + sum(frac[N-i] / 2<sup>i</sup>)) where N is the number of bits.
14+
//! Subnormals are slightly different and weird, but the same principle applies.
1515
//!
16-
//! Here, however, we represent them as (sig, k) with f positive, such that the value is f * 2^e.
17-
//! Besides making the "hidden bit" explicit, this changes the exponent by the so-called
18-
//! mantissa shift.
16+
//! Here, however, we represent them as (sig, k) with f positive, such that the value is f *
17+
//! 2<sup>e</sup>. Besides making the "hidden bit" explicit, this changes the exponent by the
18+
//! so-called mantissa shift.
1919
//!
2020
//! Put another way, normally floats are written as (1) but here they are written as (2):
2121
//!
@@ -94,7 +94,8 @@ pub trait RawFloat : Float + Copy + Debug + LowerExp
9494
/// represented, the other code in this module makes sure to never let that happen.
9595
fn from_int(x: u64) -> Self;
9696

97-
/// Get the value 10^e from a pre-computed table. Panics for e >= ceil_log5_of_max_sig().
97+
/// Get the value 10<sup>e</sup> from a pre-computed table. Panics for e >=
98+
/// ceil_log5_of_max_sig().
9899
fn short_fast_pow10(e: usize) -> Self;
99100

100101
// FIXME Everything that follows should be associated constants, but taking the value of an

Diff for: ‎src/librustc/ty/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl Size {
267267

268268
/// Alignment of a type in bytes, both ABI-mandated and preferred.
269269
/// Since alignments are always powers of 2, we can pack both in one byte,
270-
/// giving each a nibble (4 bits) for a maximum alignment of 2^15 = 32768.
270+
/// giving each a nibble (4 bits) for a maximum alignment of 2<sup>15</sup> = 32768.
271271
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
272272
pub struct Align {
273273
raw: u8

0 commit comments

Comments
 (0)
Please sign in to comment.