We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This caught me by surprise. I expected it would raise an exception, similar to div by zero.
Is this behavior correct? If so, what is the rationale for it?
Repro:
int_of_float(infinity) // or int_of_float(nan)
The text was updated successfully, but these errors were encountered:
infinity
0
I suppose the rationale can be given by the conversion function defined by EMCA-262 (i.e. The JavaScript language specification). This seems like the most natural and likely most performant conversion, given ReScript's goal of seamless integration with JavaScript.
I'll consider the issue resolved based on this.
Sorry, something went wrong.
No branches or pull requests
This caught me by surprise. I expected it would raise an exception, similar to div by zero.
Is this behavior correct? If so, what is the rationale for it?
Repro:
The text was updated successfully, but these errors were encountered: