<div dir="auto">Hi Ken,</div><div dir="auto">I don’t have a strong opinion about Complex and I’m cool with either option, specially because it’s not in the base image and because I don’t really use the package. But for this kind of situation I tried both approaches (reducing them or not), and in general I decided to not reduce them. One of the reasons is that if you reduce them then you might end up with a Number instead of an instance of Complex, and for it to be consistent you’d have to implement the Complex protocol in Number, or you might get a MNU. In fact I ended up implementing my own “fractions” (that I call Rational) and they don’t reduce to integers. Another reason for doing it like this with fractions and other “numbers” is to avoid ambiguities, for example I have the message isUnit that returns true if the element has an inverse, and for example the rational number 2/1 is a unit (the inverse is 1/2) but the integer 2 is not a unit.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Luciano</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 26 Feb 2023 at 20:48 ken.dickey--- via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On 2023-02-26 05:31, ken.dickey--- via Cuis-dev wrote:<br>
<br>
> BTW, we can do better. I think -4+0i above should be and print as -4.<br>
<br>
Ah! The code is already there and just needed to be uncommented <br>
(attached).<br>
<br>
As we have Complex>>basicReal:imaginary: why does <br>
Complex>>real:imaginary not do the simplification? Can we not just <br>
enable this?<br>
<br>
Thanks,<br>
-KenD<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>