Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 8, 2024

These function operate of floats so this is slighlyt more correct and perhaps faster in some cases I guess.

// TODO: optimize
if (isnan(__a[0]) || isinf(__a[0])) return 0x8000000000000000LL;
long long x = llrint(__a[0]);
long long x = llrintf(__a[0]);
Copy link
Member

Choose a reason for hiding this comment

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

But __m128d is f64x2, so operating on doubles should be more correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do is the fabsf on the line below wrong in this case then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the line below instead.

These function operate of floats so this is slighlyt more correct and
perhaps faster in some cases I guess.
@sbc100 sbc100 merged commit f15419f into emscripten-core:main Nov 12, 2024
28 checks passed
@sbc100 sbc100 deleted the llrintf branch November 12, 2024 01:13
uysalibov pushed a commit to uysalibov/emscripten that referenced this pull request Nov 15, 2024
These function operate of floats so this is slighlyt more correct and
perhaps faster in some cases I guess.
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