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

isNaN(X) where X is greater than e9e15 return true #41

Closed
1e1000000 opened this issue Feb 3, 2021 · 3 comments
Closed

isNaN(X) where X is greater than e9e15 return true #41

1e1000000 opened this issue Feb 3, 2021 · 3 comments

Comments

@1e1000000
Copy link

1e1000000 commented Feb 3, 2021

Expected result:

isNaN("ee16")
false

Actual result:

isNaN("ee16")
true

I seem it most likely because break_infinity.js

@Patashu
Copy link
Owner

Patashu commented Nov 21, 2021

isNan is a built in function, I didn't write it, and "ee16" is indeed not a number. maybe you mean this?

Decimal.fromString("ee16").toNumber()
Infinity
isNaN(Decimal.fromString("ee16").toNumber())
false

@Patashu Patashu closed this as completed Nov 21, 2021
@1e1000000
Copy link
Author

For actual result, it return true instead

@Patashu
Copy link
Owner

Patashu commented Nov 21, 2021

isNaN("ee2") is also true. Try it

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

No branches or pull requests

2 participants