Skip to content

[SYCL] Add missing special values to exp(complex) #15672

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

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

KornevNikita
Copy link
Contributor

exp(x,NaN) (for any finite x) = (NaN,NaN)
exp(NaN,y) (for any nonzero y) = (NaN,NaN)
exp(x,+∞) (for any finite x) = (NaN,NaN)

https://en.cppreference.com/w/cpp/numeric/complex/exp
E2E: #15666

exp(x,NaN) (for any finite x) = (NaN,NaN)
exp(NaN,y) (for any nonzero y) = (NaN,NaN)
exp(x,+∞) (for any finite x) = (NaN,NaN)

https://en.cppreference.com/w/cpp/numeric/complex/exp
E2E: intel#15666
@KornevNikita KornevNikita marked this pull request as ready for review October 15, 2024 08:05
@KornevNikita KornevNikita requested a review from a team as a code owner October 15, 2024 08:05
@KornevNikita
Copy link
Contributor Author

@intel/llvm-reviewers-runtime could you take a look please?

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +157 to +158
} else if (__spirv_IsFinite(z_real)) {
if (__spirv_IsNan(z_imag) || __spirv_IsInf(z_imag))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

Suggested change
} else if (__spirv_IsFinite(z_real)) {
if (__spirv_IsNan(z_imag) || __spirv_IsInf(z_imag))
} else if (__spirv_IsFinite(z_real) &&
(__spirv_IsNan(z_imag) || __spirv_IsInf(z_imag))) {

@steffenlarsen steffenlarsen merged commit 2f38de0 into intel:sycl Oct 15, 2024
12 checks passed
KornevNikita added a commit to KornevNikita/llvm that referenced this pull request Nov 4, 2024
Follow-up to intel#15672
This patch updates float behavior
sarnex pushed a commit that referenced this pull request Nov 7, 2024
Follow-up to #15672
This patch updates float behavior

---------

Signed-off-by: jinge90 <[email protected]>
Co-authored-by: jinge90 <[email protected]>
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