-
Bug
-
Resolution: Fixed
-
P4
-
8
-
None
-
b102
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8149326 | 8u101 | Hannes Wallnoefer | P4 | Resolved | Fixed | b01 |
JDK-8148069 | 8u92 | Hannes Wallnoefer | P4 | Resolved | Fixed | b04 |
JDK-8155511 | emb-8u101 | Hannes Wallnoefer | P4 | Resolved | Fixed | b01 |
This bug was reported by Tomas Hurka via mail.
On JDK 8, calling Long.valueOf("301077366599181567") and converting the result to string seems to convert the number to double since the result shows a loss of precision.
nashorn> java.lang.Long.valueOf("301077366599181567").toString()
301077366599181570
If toString() would have been called on the java.lang.Long instance, the result should not loose precision and be the same as the input string.
On JDK 8, calling Long.valueOf("301077366599181567") and converting the result to string seems to convert the number to double since the result shows a loss of precision.
nashorn> java.lang.Long.valueOf("301077366599181567").toString()
301077366599181570
If toString() would have been called on the java.lang.Long instance, the result should not loose precision and be the same as the input string.
- backported by
-
JDK-8148069 java.lang.Long is implicitly converted to double
-
- Resolved
-
-
JDK-8149326 java.lang.Long is implicitly converted to double
-
- Resolved
-
-
JDK-8155511 java.lang.Long is implicitly converted to double
-
- Resolved
-
- duplicates
-
JDK-8146264 BigInteger precision is lost in nashorn
-
- Closed
-
- relates to
-
JDK-8182996 Incorrect mapping Long type to JavaScript equivalent
-
- Closed
-
-
JDK-8146264 BigInteger precision is lost in nashorn
-
- Closed
-
(1 relates to)