Bill Allombert on Sat, 10 Mar 2007 18:53:32 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Desired behaviour ? |
On Sat, Mar 10, 2007 at 05:34:22PM +0100, Loic Grenie wrote: > > I'm just wondering if there is a strong reason why 1.*I*I has an > imaginary part (equal to 0., but it's there). For instance neither I*I*1. > nor 1.*(I*I) have any imaginary part. My understanding is that I*I should return -1+0*I but wrongly return -1. So 1.*I*I should have an imaginary part (along with I*I*1. and 1.*(I*I) of course). The rationale is that arithmetic operation should preserve the definition domain so that domain detection work: Compare: factor(x^2-(-1+0*I)) factor(x^2-I*I) both should returns [x - I 1] [x + I 1] (The second doesn't) Cheers, Bill.