RFR: 8338529: Initial iteration of numerics modeling interfaces [v3]

John R Rose jrose at openjdk.org
Sat Jan 17 00:06:58 UTC 2026


On Fri, 16 Jan 2026 20:50:42 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> A refinement of some earlier ideas on the numerics modeling interfaces to inform further discussions.
>> 
>> This is a "lumpy" rather than "splitty" design in terms of favoring a smaller number of interfaces with more functionality rather than a larger number of interfaces making smaller distinctions.
>> 
>> Various design comments and to-do's noted in the code.
>
> Joe Darcy has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Add default methods.
>  - Respond to review feedback; add default methods.

I would prefer to see the ordering part tolerating partial orders (NaNs), and then factor the ordering part on top of both ints and floats.

Also, in the name of reducing primitives, I think a `compare(x,y)` method is the correct primitive.  It would return one of "lt", "gt", "eq", and (only for FP orders) "uo".  All the others, up to min/max, can be built on top as default methods, even if they also end up hardwired to an override, for efficiency.

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1917#issuecomment-3762263924


More information about the valhalla-dev mailing list