Skip to content

Explain what "normal" is in Single.IsNormal#12280

Open
sfiruch wants to merge 1 commit intodotnet:mainfrom
sfiruch:patch-3
Open

Explain what "normal" is in Single.IsNormal#12280
sfiruch wants to merge 1 commit intodotnet:mainfrom
sfiruch:patch-3

Conversation

@sfiruch
Copy link

@sfiruch sfiruch commented Feb 4, 2026

Summary

The documentation for Single.IsNormal is wholly unhelpful. It says it checks if a number is "Normal". Only in the remarks, "normal" is explained. This changes it to make it clear what it actually checks.

@sfiruch sfiruch requested a review from a team as a code owner February 4, 2026 09:59
Copilot AI review requested due to automatic review settings February 4, 2026 09:59
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 4, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the documentation for Single.IsNormal by expanding the summary to explain what "normal" means in the context of floating-point numbers, rather than using the technical term without explanation.

Changes:

  • Updated the <summary> element for Single.IsNormal to explicitly state what constitutes a "normal" floating-point value (not NaN, not infinite, not subnormal, and not zero)

<Docs>
<param name="f">A single-precision floating-point number.</param>
<summary>Determines whether the specified value is normal.</summary>
<summary>Determines whether the specified value is not NaN, not infinite, not subnormal, and not zero.</summary>
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The summary now duplicates the remarks section verbatim. This creates unnecessary redundancy. The consistent pattern in Double.IsNormal (xml/System/Double.xml:2950) and Half.IsNormal (xml/System/Half.xml:2219) is to have a brief summary like "Determines whether the specified value is normal" and then provide the detailed explanation in the remarks section. Consider keeping the summary concise and letting the remarks section provide the detailed explanation of what "normal" means.

Suggested change
<summary>Determines whether the specified value is not NaN, not infinite, not subnormal, and not zero.</summary>
<summary>Determines whether the specified value is normal.</summary>

Copilot uses AI. Check for mistakes.
@tannergooding
Copy link
Member

This should probably be combined into the same PR with #12281 and with the same feedback given there addressed.

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

Labels

area-System.Runtime community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants