public static final long SIGN_BIT_MASK = 0x8000000000000000L;
a perfectly legal statement and its Kotlin counterpart
Copy code
const val SIGN_BIT_MASK: Long = 0x8000000000000000L
results in an error? (Value out of range.)
Such inconsistencies make it very difficult to port any Math libraries from Java to Kotlin.
t
Tóth István Zoltán
07/16/2022, 8:22 AM
You might want to try ULong in the Kotlin code which is unsigned. I think it is a bit of inconsisteny on the Java side that long may be unsigned or signed while other types are signed by default.
🙏 1
m
Michael Paus
07/16/2022, 8:25 AM
Thanks, I’ll give ULong a try.
Michael Paus
07/16/2022, 9:22 AM
It worked although it is a bit complicated by the fact that