-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add a Debug
impl and some basic functions to f16
and f128
#123783
Conversation
This comment has been minimized.
This comment has been minimized.
b18b8b3
to
016b64a
Compare
This comment has been minimized.
This comment has been minimized.
@@ -228,3 +228,19 @@ macro_rules! floating { | |||
|
|||
floating! { f32 } | |||
floating! { f64 } | |||
|
|||
#[stable(feature = "rust1", since = "1.0.0")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the correct version, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just been using the same gate as the traits on f32
and f64
for now, since most of the impl macros don't have a way to specify the gate. I think that when this is closer to stabilization I will change the macros and add a separate gate, but for now I don't think it gains much to not just match the other floats.
`compiler_builtins` uses some convenience functions like `is_nan` and `is_sign_positive`. Add these, as well as a temporary implementation for `Debug` that prints the bit representation.
016b64a
to
5159ecd
Compare
Convenient, looks like making everything inline means we don't get blocked by the mangling test. @rustbot ready |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (7bdae13): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 676.395s -> 677.095s (0.10%) |
compiler_builtins
uses some convenience functions likeis_nan
andis_sign_positive
. Add these, as well as a temporary implementation forDebug
that prints the bit representation.