Use of long in Nashorn
Hannes Wallnoefer
hannes.wallnoefer at oracle.com
Fri Nov 13 09:31:04 UTC 2015
Hi all,
I'm currently questioning our use of longs to represent numbers in
combination with optimistic typing. After all, there's a pretty large
range where long arithmetic will be more precise than the doubles
required by ECMA.
For context see this bug, especially the last two comments (the original
bug was about number to string conversion which has been solved in the
meantime):
https://bugs.openjdk.java.net/browse/JDK-8065910
So the question is: can we use longs at all and be confident that
results won't be too precise (and thus, strictly speaking, incorrect)?
Hannes
More information about the nashorn-dev
mailing list