holgerbrandl11/29/2020, 6:40 PM
"involve rounding" as suggested by its API docs?
ephemient11/29/2020, 6:45 PM
>>> (2L shl 53) + 1 res0: kotlin.Long = 18014398509481985 >>> ((2L shl 53) + 1).toDouble().toLong() res1: kotlin.Long = 18014398509481984
louiscad11/29/2020, 6:57 PM
ephemient11/29/2020, 7:04 PM
holgerbrandl11/29/2020, 7:20 PM
value does not fit into the target type range, so some more details in the
API docs would be great.
docs state that it
which covers range issues. So the docs are somehow correct, although the big odd integers to double example is neither rounding nor truncation, so there is imho some inprecision in the docs.
may involve rounding or truncation.
ephemient11/29/2020, 7:36 PM
2.toBigInteger().pow(1024).toDouble() == Double.POSITIVE_INFINITY
holgerbrandl11/29/2020, 7:42 PM