Skip to content
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

[llvm] APFloat: Add helpers to query NaN/inf semantics #116315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthias-springer
Copy link
Member

@matthias-springer matthias-springer commented Nov 15, 2024

APFloat changes extracted from #116176 as per reviewer comments.

Copy link

github-actions bot commented Nov 15, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@matthias-springer matthias-springer force-pushed the users/matthias-springer/has_nan_inf branch from 64568e5 to 1668bd7 Compare November 15, 2024 02:09
bool APFloatBase::semanticsHasNanOrInf(const fltSemantics &semantics) {
bool APFloatBase::semanticsHasInf(const fltSemantics &semantics) {
return semantics.nonFiniteBehavior != fltNonfiniteBehavior::NanOnly &&
semantics.nonFiniteBehavior != fltNonfiniteBehavior::FiniteOnly;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the only other one left is IEEE semantics, should we check (== IEEE754) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants