On Thu, 5 May 2022 10:11:05 GMT, Raffaello Giulietti <d...@openjdk.java.net> wrote:
> Add a family of "safe" cast methods. The JLS specifies that the cast (officially, "narrowing primitive conversion") (long)-0.0 returns 0L. As these methods are meant to be safer casts, I think we should follow the JLS as closely as possible. Besides, throwing on -0.0 would make the implementation slightly more convoluted. We want C2 to emit efficient inlineable code. So, what is the use case or the rationale for throwing on -0.0? ------------- PR: https://git.openjdk.java.net/jdk/pull/8548