-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Big number division (overflow check in JIT?) #36
Comments
use integer $ ./potion -B -V -e '(60000000000 / 2) == 30000000000'
$ ./potion -B -V -e '(60e+9 / 2) == 30000000000'
exponential notation 60e+9 is always expanded to double. like with my enhanced version: |
Sorry. To answer your original question: cast to double is done with number.
Looks bad.
0.0 should be less then 0.000001 |
I pinpointed the error, it was not about types but about the VM, weird! potion -B -e '(60000000000 / 2) string print'
# (30000000000)
potion -X -e '(60000000000 / 2) string print'
# (2082712576) Since -X is default, this difference was messing with my results. Is this a bug? Note: I'm not using your p2 branch, just this potion branch. |
Yes, jit does not check for int overflow. It does this on purpose, but I want to fix it. |
Integer range is probably lacking, but how do I cast/force a long/double in potion? I tried using the scientific notation, but to no avail.
The text was updated successfully, but these errors were encountered: