<div dir="ltr"><div>Hi Juan,</div><div>I like this POV</div><div><br></div><div>Previously, I was more aligned with the pragmatic considerations of Luciano</div><div>You can't have reduction of Complex to Number because that would mean implementing complex extension of functions in Number, and that's maybe not what we want... {[-2 sqrt]. [-2 log]. [-2 arcSin]} shouldAllFail.</div><div><br></div><div>With this POV, if we want to use a complex extension of sqrt, then we have to be explicit: -2 asComplex sqrt.<br></div><div><br></div><div>Of course, Float is not Real...<br></div><div>Most of the reals cannot be represented in our computers, because we don't have any algorithm to compute them...</div><div>There are only a countable infinity of reals that we can compute, that's not that much ;)</div><div><br></div><div>Arithmetic operations with Float operands might be inexact (approximated), and that's the reason why we convert to Float and not the other way around, mixing inexact and exact arithmetic leads to inexact results...</div><div><br></div><div>For Complex, this would be more like falling in a 2nd dimension...<br></div><div><br></div><div>Nicolas<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 27 févr. 2023 à 22:41, Juan Vuletich via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/26/2023 10:48 AM, ken.dickey--- via Cuis-dev wrote:<br>
> 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>
Given that in Math, Complex is an extension of Real (and not of Integer <br>
or Rational), I think that consistency with Floats is most important. <br>
And Floats don't reduce to Integer (it would be a huge mistake to do <br>
that). That's why the commented code in #real:imaginary: would only go <br>
back if the imaginary part is not Float: doing it for Complex with Float <br>
parts would be the same as converting 0.0 to 0.<br>
<br>
And doing it differently for Complex with Float parts and with Integer <br>
parts would not be simpler. It would be more complicated, and need this <br>
extra explanation to make sense.<br>
<br>
In the Number hierarchy, Float is like a pit you can't exit once you <br>
fall into it. As Complex is an extension of Real, I think Complex should <br>
do the same.<br>
<br>
Maybe this rant should be in the comment at #real:imaginary:, after all.<br>
<br>
Thanks,<br>
<br>
-- <br>
Juan Vuletich<br>
<a href="http://cuis.st" rel="noreferrer" target="_blank">cuis.st</a><br>
<a href="http://github.com/jvuletich" rel="noreferrer" target="_blank">github.com/jvuletich</a><br>
<a href="http://researchgate.net/profile/Juan-Vuletich" rel="noreferrer" target="_blank">researchgate.net/profile/Juan-Vuletich</a><br>
<a href="http://independent.academia.edu/JuanVuletich" rel="noreferrer" target="_blank">independent.academia.edu/JuanVuletich</a><br>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" rel="noreferrer" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a><br>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" rel="noreferrer" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a><br>
<a href="http://twitter.com/JuanVuletich" rel="noreferrer" target="_blank">twitter.com/JuanVuletich</a><br>
<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>