Skip to content

fix: check nan during casting from float to boolean #1437

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 11 commits into from
Aug 20, 2020
Merged

fix: check nan during casting from float to boolean #1437

merged 11 commits into from
Aug 20, 2020

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Aug 17, 2020

description in this comment

Also change implementation for float to boolean conversion

  • I've read the contributing guidelines

@MaxGraey MaxGraey requested a review from dcodeIO August 17, 2020 20:23
@dcodeIO
Copy link
Member

dcodeIO commented Aug 20, 2020

Since this is close to black magic, can we add a few tests for NaN (various bit patterns ideally), Infinity, -Infinity, 0.0, f64.MIN_VALUE, f64.MAX_VALUE, just for peace of mind? :)

@MaxGraey
Copy link
Member Author

Done!

@MaxGraey MaxGraey requested a review from dcodeIO August 20, 2020 12:57
@MaxGraey MaxGraey requested a review from dcodeIO August 20, 2020 14:52
@dcodeIO dcodeIO merged commit 45bfe04 into AssemblyScript:master Aug 20, 2020
@MaxGraey MaxGraey deleted the fix-float-to-bool-cast branch August 20, 2020 15:46
@github-actions
Copy link

🎉 This PR is included in version 0.14.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants