[squeak-dev] Re: Migrating Complex in a separate package
Ricardo Moran
richi.moran at gmail.com
Tue Oct 11 14:16:23 UTC 2011
On Tue, Oct 11, 2011 at 10:48 AM, Juan Vuletich <juan at jvuletich.org> wrote:
> Ricardo Moran wrote:
>
>
>> On Tue, Oct 11, 2011 at 9:51 AM, Juan Vuletich <juan at jvuletich.org<mailto:
>> juan at jvuletich.org>> wrote:
>>
>> Juan Vuletich wrote:
>>
>> Hi Folks,
>>
>> Rodney Polkinghorne wrote:
>>
>> ...
>>
>> extra fact:
>> - Complex is absent from Cuis
>>
>>
>> Not for long :) . I have already integrated it and will be in
>> next Cuis release. I think Complex belongs in the base system.
>>
>>
>> Oh, forgot to say. I also think that
>> -1 sqrt = 1i
>> should be true, and I'm working on it (together with some other
>> tweaks to #sqrt and friends I'll publish when finished).
>>
>>
>> +1. I was just about to comment on that one :)
>>
>> It always bothered me that "-1 sqrt" wouldn't answer "1i". It seems like
>> an incomplete implementation, being that we have the class Complex.
>> At the time I "fixed" it by just relying on the fact that the sqrt
>> primitive fails when the receiver is negative, but that solution seems very
>> hackish. I wonder what your solution looks like? :)
>>
>> Cheers,
>> Richo
>>
>
> I don't think it is hackish... It is the usual way for dealing with cases
> the primitives can't deal. That's totally ok for me.
>
Mmm... maybe I don't mess enough with primitives to avoid feeling wrong
about it :)
>
> What I'm trying to fix is that '4 sqrt' and '8 raisedTo: 1/3' answer
> Floats, when they should answer SmallIntegers.
>
Nice! That would allow
(4 sqrt) = (8 raisedTo: 1/3) ----> true
What I would *really* like is some kind of symbolic algebra written entirely
in Smalltalk. But I guess it's too much to ask, right? :)
Cheers,
Richo
> Cheers,
> Juan Vuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20111011/a8c06ba4/attachment.htm
More information about the Squeak-dev
mailing list
|