On Mon, 31 Aug 2026 20:23:30 GMT, John Hendrikx <[email protected]> wrote:
>> should we have a check for Double.MAX_VALUE to avoid possible misuse? > > I think it would best to ignore this in this PR (it was broken before, it is > still now), and instead make a follow-up PR that switches round -> rint (this > was sort of the plan already) as round behaves poorly with our current > sentinel `Double.MAX_VALUE` or anything else that wouldn't fit in a `long`. > > In that same PR, we can remove the `ulp` in the ceiling code, as removing an > `ulp` from `Double.MAX_VALUE` severely changes the value with no recourse. A > constant epsilon (that is far smaller than `Double.MAX_VALUE`) would just be > ignored, ie: > > Double.MAX_VALUE - 0.0000001 == Double.MAX_VALUE > > But > > Double.MAX_VALUE - ulp(Double.MAX_VALUE) >> Double.MAX_VALUE > > (with `>>` meaning a lot smaller) +1 for `round->rint` and removing the `ScaledMath.round()` in a followup. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2278#discussion_r3898154942
