On Thu, 22 Jan 2026 00:35:05 GMT, Joe Darcy <[email protected]> wrote:

> First cut at a version of complex numbers using the textbook algorithms for 
> the arithmetic operations. This version is intended for prototyping and _not_ 
> for production use.

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.

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

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

Reply via email to