JDK 9 RFR of 4477961: java.lang.Math.toDegrees(double) could be optimized

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Sep 23 15:15:37 UTC 2014

On 09/23/2014 07:12 PM, Brian Burkhalter wrote:
>> Ah, sorry for confusing language about "compile-time constants", I meant
>> "compile-time constant expression", as per JLS 15.28. Constant
>> expressions are FP-strict, so it should be just fine correctness- and
>> performance-wise, and less cryptic:
>> private static final double DEGREES_TO_RADIANS = PI / 180.0;
> Thanks for the clarification. As the issue is already resolved, however,
> I am not inclined to change the code unless there is a serious objection
> in which case I can file another issue.

Ok, that's fine, keep the constant.


More information about the core-libs-dev mailing list