RFR: 8376040: Add prototype "textbook complex" class [v2]

Joe Darcy darcy at openjdk.org
Fri Jan 23 21:24:02 UTC 2026


On Thu, 22 Jan 2026 10:59:03 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Respond to review comments, cleanup.
>
> src/java.base/share/classes/java/lang/ComplexTextbook.java line 116:
> 
>> 114:     public double imag() { // better as a static method?
>> 115:         return imag;
>> 116:     }
> 
> Besides being shorter and unambiguous, `re()` and `im()` are the standard names used in maths AFAIK.

Hmm.
I'd prefer to leave the more idiomatic or Java "real" and "imag" for now, but acknowledged "re" and "im" are common in other contexts.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1942#discussion_r2722885496


More information about the valhalla-dev mailing list