logoalt Hacker News

yifanlyesterday at 6:26 PM1 replyview on HN

Typically, the order of complex numbers is done by projecting C onto R, i.e. by taking the absolute value.


Replies

chongliyesterday at 7:04 PM

Yes I’m aware. It’s a work around but doesn’t give you a sensible ordering the way most people expect, i.e:

-2 > 1 (in C)

Which is why I prefer to leave <,> undefined in C and just take the magnitude if I want to compare complex numbers.