revised isfinite, _finite, and _finitef documentation - #5962
Conversation
this corrects some information of the `isfinite`, `_finite`, and `_finitef` reference page: the current page lists `<math.h>` and `<cmath>` as valid headers for `_finite` even though the current UCRT declares it only through `<float.h>` and `<cfloat>`. its remarks section also name x86 instead of x64 as a supported `_finitef` target, while the UCRT implementation disagrees. the return value section benignly omitted signed zeros. this revision addresses the C and C++ header requirements, and makes it evident that normal numbers, subnormal numbers, and **both signed zeros** are finite.
|
@Eulernion : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
@Eulernion : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 68801be: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
Regan Downer (@v-regandowner) I take it the note was meant for me; as such: #sign-off |
|
@Eulernion - No, in the public repo, pull requests should only be signed off by the author/owner. Tyler Whitney (@TylerMSFT) - Could you take a look? Thanks! |
Tyler Whitney (TylerMSFT)
left a comment
There was a problem hiding this comment.
Thank you for updating this.
|
#sign-off |
Tyler Whitney (TylerMSFT)
left a comment
There was a problem hiding this comment.
Thank you for the update!
Minor wordsmithing
|
Learn Build status updates of commit 898bca0: ✅ Validation status: passed
For more details, please refer to the build report. |
|
#sign-off |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved platform, metadata, and documentation-style issues remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates CRT documentation for isfinite, _finite, and _finitef.
Changes:
- Corrects C and C++ header requirements.
- Documents both signed zeros as finite.
- Updates
_finitefplatform information.
File summaries
| File | Review summary |
|---|---|
docs/c-runtime-library/reference/finite-finitef.md |
Requires updates for ARM64EC syntax, frontmatter metadata, and lowercase nan. |
Review details
Suppressed comments (1)
docs/c-runtime-library/reference/finite-finitef.md:45
- Use lowercase in the spelled-out form of
NaN; the documentation style reserves capitalization for proper nouns.
The `isfinite` macro and the `_finite` and `_finitef` functions return a non-zero value if *`x`* is a normal, subnormal, or signed zero (`±0`) finite value. They return 0 if the argument is infinite or Not a Number (NaN). The C++ inline template function `isfinite` behaves the same way but returns **`true`** or **`false`**.
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| `isfinite` is a macro when compiled as C, and an inline template function when compiled as C++. | ||
|
|
||
| `_finitef` is only available when compiling for the x64, ARM, ARM64, or ARM64EC platforms. |
| ## Return value | ||
|
|
||
| The `isfinite` macro and the `_finite` and `_finitef` functions return a non-zero value if *`x`* is either a normal or subnormal finite value. They return 0 if the argument is infinite or a NaN. The C++ inline template function `isfinite` behaves the same way, but returns **`true`** or **`false`**. | ||
| The `isfinite` macro and the `_finite` and `_finitef` functions return a non-zero value if *`x`* is a normal, subnormal, or signed zero (`±0`) finite value. They return 0 if the argument is infinite or Not a Number (NaN). The C++ inline template function `isfinite` behaves the same way but returns **`true`** or **`false`**. |
530c251
into
MicrosoftDocs:main
…//github.com/MicrosoftDocs/cpp-docs (branch main) (#6818) * Update Vectorized STL algorithm documentation to reflect the current stae (#5937) Since the last update: * ARM64 and ARM64EC vectorization was added. Mention of x64 and x86 is removed, as vectorization is now supported on any target, except deprecated `/clr:pure` and `/clr:safe` modes. * `includes` is now manually vectorized too * `replace_copy` is now manually vectorized too Also moved `find_end` to `search` / `search_n` group, where it fits better. * Update header-files-cpp.md (#5938) Clarify intent of section * Update documentation on accessing System.String characters (#5940) * Update documentation on accessing System.String characters Added important note about treating interior pointers as const and linked to unsafe code best practices. * Update docs/dotnet/how-to-access-characters-in-a-system-string.md Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Apply suggestions from code review Co-authored-by: Aaron R Robinson <arobins@microsoft.com> * Apply suggestions from code review Co-authored-by: Aaron R Robinson <arobins@microsoft.com> --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Clarify version prefix for Visual Studio Command Prompt (#5946) Updated instructions for starting Visual Studio Command Prompt to reflect changes in version specification. * Add new ARM64 feature arguments to documentation (#5950) Add new extensions `cssc` and `faminmax` to the `/feature` flag arguments documentation * atexit: Clarify DLL behavior is the same as _onexit (#5952) * atexit: Clarify DLL behavior is the same as _onexit - Document that atexit called from within a DLL will register the routine to run when the DLL is unloaded. atexit is a wrapper around _onexit which already documents this behavior. Ref: curl/curl#22383 (comment) Reported-by: Michał Petryka Closes #xxxx * Revise atexit documentation for accuracy Update the date and clarify DLL behavior for atexit. --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * Resolve syncing conflicts from FromPrivateLiveToMaster to main (#5953) * Clarify sentence about updating UI item states (#5955) Added a question mark to clarify the sentence about updating the state of user-interface items. * Update acquisition doc for vcpkg (#5957) * Update acquisition doc for vcpkg * remove en-us from URL * use relative link to vcpkg docs * Resolve syncing conflicts from FromPrivateLiveToMaster to main (#5959) * Filesystem (#6805) * sorting out deprecated filsystem * refactor <filesystem> docs so that experiemental stuff is in its own location and doesn't overlap * Apply batched suggestions from code review Co-authored-by: learn-build-service-prod-05[bot] <274429479+learn-build-service-prod-05[bot]@users.noreply.github.com> * Apply batched suggestions from code review Co-authored-by: learn-build-service-prod-05[bot] <274429479+learn-build-service-prod-05[bot]@users.noreply.github.com> * Fix formatting of function descriptions in documentation * small edits * tech review and add spaceship operator to the director_entry class --------- Co-authored-by: TylerMSFT <12305055+TylerMSFT@users.noreply.github.com> Co-authored-by: learn-build-service-prod-05[bot] <274429479+learn-build-service-prod-05[bot]@users.noreply.github.com> * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#6802) * Update Vectorized STL algorithm documentation to reflect the current stae (#5937) Since the last update: * ARM64 and ARM64EC vectorization was added. Mention of x64 and x86 is removed, as vectorization is now supported on any target, except deprecated `/clr:pure` and `/clr:safe` modes. * `includes` is now manually vectorized too * `replace_copy` is now manually vectorized too Also moved `find_end` to `search` / `search_n` group, where it fits better. * Update header-files-cpp.md (#5938) Clarify intent of section * Update documentation on accessing System.String characters (#5940) * Update documentation on accessing System.String characters Added important note about treating interior pointers as const and linked to unsafe code best practices. * Update docs/dotnet/how-to-access-characters-in-a-system-string.md Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Apply suggestions from code review Co-authored-by: Aaron R Robinson <arobins@microsoft.com> * Apply suggestions from code review Co-authored-by: Aaron R Robinson <arobins@microsoft.com> --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Clarify version prefix for Visual Studio Command Prompt (#5946) Updated instructions for starting Visual Studio Command Prompt to reflect changes in version specification. * Add new ARM64 feature arguments to documentation (#5950) Add new extensions `cssc` and `faminmax` to the `/feature` flag arguments documentation * atexit: Clarify DLL behavior is the same as _onexit (#5952) * atexit: Clarify DLL behavior is the same as _onexit - Document that atexit called from within a DLL will register the routine to run when the DLL is unloaded. atexit is a wrapper around _onexit which already documents this behavior. Ref: curl/curl#22383 (comment) Reported-by: Michał Petryka Closes #xxxx * Revise atexit documentation for accuracy Update the date and clarify DLL behavior for atexit. --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * Resolve syncing conflicts from FromPrivateLiveToMaster to main (#5953) * Clarify sentence about updating UI item states (#5955) Added a question mark to clarify the sentence about updating the state of user-interface items. * Update acquisition doc for vcpkg (#5957) * Update acquisition doc for vcpkg * remove en-us from URL * use relative link to vcpkg docs * Update docs/mfc/how-to-update-user-interface-objects.md Co-authored-by: learn-build-service-prod-08[bot] <274430765+learn-build-service-prod-08[bot]@users.noreply.github.com> --------- Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Co-authored-by: Learn Build Service GitHub App <Learn Build Service LearnBuild@microsoft.com> Co-authored-by: Alex Guteniev <gutenev@gmail.com> Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com> Co-authored-by: Aaron R Robinson <arobins@microsoft.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: Eric Brumer <ericbr@microsoft.com> Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro <raysatiro@yahoo.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Daniel Nikolov <114946180+danikolovv@users.noreply.github.com> Co-authored-by: Hector <v-ndat@microsoft.com> Co-authored-by: learn-build-service-prod-08[bot] <274430765+learn-build-service-prod-08[bot]@users.noreply.github.com> --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <12305055+TylerMSFT@users.noreply.github.com> Co-authored-by: learn-build-service-prod-05[bot] <274429479+learn-build-service-prod-05[bot]@users.noreply.github.com> Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Co-authored-by: Learn Build Service GitHub App <Learn Build Service LearnBuild@microsoft.com> Co-authored-by: Alex Guteniev <gutenev@gmail.com> Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com> Co-authored-by: Aaron R Robinson <arobins@microsoft.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: Eric Brumer <ericbr@microsoft.com> Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro <raysatiro@yahoo.com> Co-authored-by: Daniel Nikolov <114946180+danikolovv@users.noreply.github.com> Co-authored-by: Hector <v-ndat@microsoft.com> Co-authored-by: learn-build-service-prod-08[bot] <274430765+learn-build-service-prod-08[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v-regandowner <97987445+v-regandowner@users.noreply.github.com> * revised `isfinite`, `_finite`, and `_finitef` documentation (#5962) * revised `isfinite`, `_finite`, and `_finitef` documentation this corrects some information of the `isfinite`, `_finite`, and `_finitef` reference page: the current page lists `<math.h>` and `<cmath>` as valid headers for `_finite` even though the current UCRT declares it only through `<float.h>` and `<cfloat>`. its remarks section also name x86 instead of x64 as a supported `_finitef` target, while the UCRT implementation disagrees. the return value section benignly omitted signed zeros. this revision addresses the C and C++ header requirements, and makes it evident that normal numbers, subnormal numbers, and **both signed zeros** are finite. * Update documentation for isfinite and finite functions Minor wordsmithing --------- Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> --------- Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Co-authored-by: Learn Build Service GitHub App <Learn Build Service LearnBuild@microsoft.com> Co-authored-by: Alex Guteniev <gutenev@gmail.com> Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com> Co-authored-by: Aaron R Robinson <arobins@microsoft.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: Eric Brumer <ericbr@microsoft.com> Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro <raysatiro@yahoo.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Daniel Nikolov <114946180+danikolovv@users.noreply.github.com> Co-authored-by: TylerMSFT <12305055+TylerMSFT@users.noreply.github.com> Co-authored-by: learn-build-service-prod-05[bot] <274429479+learn-build-service-prod-05[bot]@users.noreply.github.com> Co-authored-by: Hector <v-ndat@microsoft.com> Co-authored-by: learn-build-service-prod-08[bot] <274430765+learn-build-service-prod-08[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v-regandowner <97987445+v-regandowner@users.noreply.github.com> Co-authored-by: Eulernion <vrcgpt@gmail.com>
this corrects some information of the
isfinite,_finite, and_finitefreference page: the current page lists<math.h>and<cmath>as valid headers for_finiteeven though the current UCRT declares it only through<float.h>and<cfloat>. its remarks section also name x86 instead of x64 as a supported_finiteftarget, while the UCRT implementation disagrees. the return value section benignly omitted signed zeros. this revision addresses the C and C++ header requirements, and makes it evident that normal numbers, subnormal numbers, and both signed zeros are finite.