Skip to content

Exposing Float Masks#154372

Draft
Apersoma wants to merge 3 commits intorust-lang:mainfrom
Apersoma:float_masks
Draft

Exposing Float Masks#154372
Apersoma wants to merge 3 commits intorust-lang:mainfrom
Apersoma:float_masks

Conversation

@Apersoma
Copy link

@Apersoma Apersoma commented Mar 25, 2026

Tracking issue: #154064
ACP: rust-lang/libs-team#753

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 25, 2026
@rust-log-analyzer
Copy link
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu, tool: "tidy", path: "src/tools/tidy", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 11.897
[TIMING:end] tool::Tidy { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu } -- 0.000
fmt check
Diff in /checkout/library/core/src/num/f32.rs:573:
     pub const MIN_EXACT_INTEGER: i32 = -Self::MAX_EXACT_INTEGER;
 
     /// The mask of the bit used to encode the sign of an [`f32`].
-    /// 
+    ///
     /// This bit is set when the sign is negative an unset when the sign is
     /// positive.
     /// It is generally recommended to use `is_sign_positive` and `is_sign_negative` when
Diff in /checkout/library/core/src/num/f32.rs:580:
     /// checking the sign of a float.
-    /// 
+    ///
     /// [`is_sign_positive`]: f32::is_sign_positive
     /// [`is_sign_negative`]: f32::is_sign_negative
     /// ```rust
Diff in /checkout/library/core/src/num/f32.rs:595:
     pub const SIGN_MASK: u32 = 0x8000_0000;
 
     /// The mask of the bits used to encode the exponent of an [`f64`].
-    /// 
+    ///
     /// The exponent is encoded with a bias.
-    /// 
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// todo!()
Diff in /checkout/library/core/src/num/f32.rs:607:
 
     /// The mask of the bits used to encode the mantissa of an [`f32`].
     ///
-    /// Note that the implicit bit 
-    /// 
+    /// Note that the implicit bit
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// let mantissa_mask = f32::MANTISSA_MASK;
Diff in /checkout/library/core/src/num/f64.rs:572:
     pub const MIN_EXACT_INTEGER: i64 = -Self::MAX_EXACT_INTEGER;
 
     /// The mask of the bit used to encode the sign of an [`f64`].
-    /// 
+    ///
     /// This bit is set when the sign is negative an unset when the sign is
     /// positive.
     /// It is generally recommended to use `is_sign_positive` and `is_sign_negative` when
Diff in /checkout/library/core/src/num/f64.rs:579:
     /// checking the sign of a float.
-    /// 
+    ///
     /// [`is_sign_positive`]: f64::is_sign_positive
     /// [`is_sign_negative`]: f64::is_sign_negative
     /// ```rust
Diff in /checkout/library/core/src/num/f64.rs:594:
     pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
 
     /// The mask of the bits used to encode the exponent of an [`f64`].
-    /// 
+    ///
     /// The exponent is encoded with a bias.
-    /// 
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// todo!()
Diff in /checkout/library/core/src/num/f64.rs:606:
 
     /// The mask of the bits used to encode the mantissa of an [`f64`].
     ///
-    /// Note that the implicit bit 
-    /// 
+    /// Note that the implicit bit
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// let mantissa_mask = f64::MANTISSA_MASK;
Diff in /checkout/library/core/src/num/f16.rs:334:
     pub const MIN_EXACT_INTEGER: i16 = -Self::MAX_EXACT_INTEGER;
 
     /// The mask of the bit used to encode the sign of an [`f16`].
-    /// 
+    ///
     /// This bit is set when the sign is negative an unset when the sign is
     /// positive.
     /// It is generally recommended to use `is_sign_positive` and `is_sign_negative` when
Diff in /checkout/library/core/src/num/f16.rs:341:
     /// checking the sign of a float.
-    /// 
+    ///
     /// [`is_sign_positive`]: f16::is_sign_positive
     /// [`is_sign_negative`]: f16::is_sign_negative
     /// ```rust
Diff in /checkout/library/core/src/num/f16.rs:356:
     pub const SIGN_MASK: u16 = 0x8000;
 
     /// The mask of the bits used to encode the exponent of an [`f64`].
-    /// 
+    ///
     /// The exponent is encoded with a bias.
-    /// 
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// todo!()
Diff in /checkout/library/core/src/num/f16.rs:368:
 
     /// The mask of the bits used to encode the mantissa of an [`f16`].
     ///
-    /// Note that the implicit bit 
-    /// 
+    /// Note that the implicit bit
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// let mantissa_mask = f16::MANTISSA_MASK;
Diff in /checkout/library/core/src/num/f128.rs:340:
     pub const MIN_EXACT_INTEGER: i128 = -Self::MAX_EXACT_INTEGER;
 
     /// The mask of the bit used to encode the sign of an [`f128`].
-    /// 
+    ///
     /// This bit is set when the sign is negative an unset when the sign is
     /// positive.
     /// It is generally recommended to use `is_sign_positive` and `is_sign_negative` when
Diff in /checkout/library/core/src/num/f128.rs:347:
     /// checking the sign of a float.
-    /// 
+    ///
     /// [`is_sign_positive`]: f128::is_sign_positive
     /// [`is_sign_negative`]: f128::is_sign_negative
     /// ```rust
Diff in /checkout/library/core/src/num/f128.rs:362:
     pub const SIGN_MASK: u128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
 
     /// The mask of the bits used to encode the exponent of an [`f64`].
-    /// 
+    ///
     /// The exponent is encoded with a bias.
-    /// 
+    ///
     /// ```rust
     /// #![feature(float_masks)]
     /// todo!()
Diff in /checkout/library/core/src/num/f128.rs:374:
 
     /// The mask of the bits used to encode the mantissa of an [`f128`].
     ///
-    /// Note that the implicit bit 
-    /// 
+    /// Note that the implicit bit
+    ///

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants