Is it reasonable to make specification clearer ?

Either to return JLS 1 specification:
<<<
The result is rounded to an integer by adding , taking the floor of the
result, and casting the result to type long.
>>>
or to replace "rounding up" with "rounding to positive infinity":
<<<
Returns the closest {@code int} to the argument, with ties rounding to
positive infinity.
>>>


On Tue, Aug 27, 2013 at 3:19 AM, Brian Burkhalter <
brian.burkhal...@oracle.com> wrote:

> On Aug 26, 2013, at 7:52 AM, Guy Steele wrote:
>
> On Aug 24, 2013, at 3:02 PM, Jeff Hain <jeffh...@rocketmail.com> wrote:
>
>
> Dmitry Nadezhin wrote:
>
> Nevertheless, I send this variant now in hope that it may be useful.
>
>
> Great! It's much faster than what I proposed, cleaner (only integers),
>
> and according to my tests it behaves the same.
>
>
> Excellent!  Nice piece of work---thanks, Dmitry.
>
>
> Indeed - thanks, Dmitry! That is much better than what I proposed.
>
> I did a quick and dirty JMH test with this code and it looks to be more
> than 6% faster for double and more than 24% faster for float versus the
> current codebase. The speed up is probably more than these values which
> should be considered lower bounds on speed improvement.
>
> I have updated the webrev accordingly:
>
> http://cr.openjdk.java.net/~bpb/8010430/
>
> Approval by a Reviewer of this patch is still needed.
>
> Thanks,
>
> Brian
>

Reply via email to