On Mon, Oct 24, 2011 at 6:49 PM, Gabriel Dos Reis wrote: > ... > Another example: Consider the function leftLcm from > NonCommutativeOperatorDivision(P,F) where > P: MonogenicLinearOperator(F) > F: Field > > the function definition is: > > leftLcm(a,b) == > a = 0 =>b > b = 0 =>a > b0 := b > u := monomial(1,0)$P > v := 0 > while leadingCoefficient b ~= 0 repeat > qr := leftDivide(a,b) > (a, b) := (b, qr.remainder) > (u, v) := (u*qr.quotient+v, u) > b0*u > > > The problem is the definition of the local variable v: > > v := 0 >
I like this example, although now I believe also your first example. > There are four candidates in scope: > > 0: P > 0: F > 0: NonNegativeInteger > 0: Integer > > (the right answer is 0@P). > So it is a coincidence that the compiler happens to choose 0@P or that the representation of all of these candidates is the same so that it does not matter? Regards, Bill Page -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
