[Cuis-dev] Some un-accurate information on The Cuis Book

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Feb 27 14:42:17 PST 2023


Hi Juan,
I like this POV

Previously, I was more aligned with the pragmatic considerations of Luciano
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.

With this POV, if we want to use a complex extension of sqrt, then we have
to be explicit: -2 asComplex sqrt.

Of course, Float is not Real...
Most of the reals cannot be represented in our computers, because we don't
have any algorithm to compute them...
There are only a countable infinity of reals that we can compute, that's
not that much ;)

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...

For Complex, this would be more like falling in a 2nd dimension...

Nicolas



Le lun. 27 févr. 2023 à 22:41, Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> a écrit :

> On 2/26/2023 10:48 AM, ken.dickey--- via Cuis-dev wrote:
> > On 2023-02-26 05:31, ken.dickey--- via Cuis-dev wrote:
> >
> >> BTW, we can do better.  I think -4+0i above should be and print as -4.
> >
> > Ah! The code is already there and just needed to be uncommented
> > (attached).
> >
> > As we have Complex>>basicReal:imaginary: why does
> > Complex>>real:imaginary not do the simplification?  Can we not just
> > enable this?
> >
> > Thanks,
> > -KenD
>
> Given that in Math, Complex is an extension of Real (and not of Integer
> or Rational), I think that consistency with Floats is most important.
> And Floats don't reduce to Integer (it would be a huge mistake to do
> that). That's why the commented code in #real:imaginary: would only go
> back if the imaginary part is not Float: doing it for Complex with Float
> parts would be the same as converting 0.0 to 0.
>
> And doing it differently for Complex with Float parts and with Integer
> parts would not be simpler. It would be more complicated, and need this
> extra explanation to make sense.
>
> In the Number hierarchy, Float is like a pit you can't exit once you
> fall into it. As Complex is an extension of Real, I think Complex should
> do the same.
>
> Maybe this rant should be in the comment at #real:imaginary:, after all.
>
> Thanks,
>
> --
> Juan Vuletich
> cuis.st
> github.com/jvuletich
> researchgate.net/profile/Juan-Vuletich
> independent.academia.edu/JuanVuletich
> patents.justia.com/inventor/juan-manuel-vuletich
> linkedin.com/in/juan-vuletich-75611b3
> twitter.com/JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230227/ed47ec82/attachment.htm>


More information about the Cuis-dev mailing list