RFR: 8310033: Clarify return value of Java Time compareTo methods [v2]
Joe Darcy
darcy at openjdk.org
Tue Jun 27 16:44:04 UTC 2023
On Tue, 20 Jun 2023 20:54:43 GMT, Jens Lidestrom <duke at openjdk.org> wrote:
> > A positive number is any number that is greater than 0. **Unlike positive integers**, which include 0
>
> math.net seems pretty alone in this. I find the notion bizarre. There seems to be an overwhelming majority of sources that consider 0 to be neither negative nor positive.
Yes, all the math conventions I'm aware of is that integer zero is neither positive nor negative. For example, the signum method returns 0 for 0, -1 for negative values, and 1 for positive values.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14479#issuecomment-1609877890
More information about the core-libs-dev
mailing list