Repository navigation
feat(libc): implement _Dtest, _LDtest and double/long-double constants - #1784
Closed
yamalameyooooo wants to merge 1 commit into
Closed
yamalameyooooo wants to merge 1 commit into
yamalameyooooo wants to merge 1 commit into
Conversation
Add the double-precision and long-double classification functions (_Dtest, _LDtest) that mirror the existing float _FDtest, and the corresponding infinity and NaN data exports (_DInf, _DNan, _LInf, _LNan) that mirror _FInf and _FNan. Tests cover positive/negative zero, denormals, finite values, signed infinities, quiet NaN, signaling NaN and the constant exports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9 tasks done
Collaborator
|
Closing: no title is shown to reach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implement the double-precision and long-double floating-point classification functions and their constant exports:
_Dtest— double-precision IEEE 754 classification (mirrors the existing_FDtestfor float)_LDtest— x87 extended-precision classification (80-bit significand in 16-byte storage)_DInf,_DNan— double-precision infinity and quiet NaN constants (mirror_FInf,_FNan)_LInf,_LNan— long-double infinity and quiet NaN constantsAll six are in the NID database and are Dinkumware CRT internals used by the guest libc for
fpclassify,isnan,isinfand related macros ondoubleandlong doublevalues.The classification functions return the same codes as
_FDtest:Zero (0),Denormal (-2),Finite (-1),Infinite (1),NotANumber (2).Tested
Not tested at runtime. Conventions check passes. Test cases added to
GuestMath.cppcovering positive/negative zero, denormals, finite values, signed infinities, quiet NaN, signaling NaN, and the constant exports.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)