> I think this interpreter signature resolution has defect:
> it should prefer the signature that has the form '(%,%)->%'.

Related functions are orderMms, mmCost of interp/i-dunsel.boot.

I see this comment in mmCost0:

   -- try to favor homogeneous multiplication
--if name = "*" and 2 = #sigArgs and first sigArgs ~= first rest
sigArgs then n := n + 1

I uncommented that (see the attached patch), seems
everything is fine, no tests broken.

Now,

s_test:= series(1/(1-a*x) ,x=0)
x*s_test
-- returns x+a*x^2+a^2*x^3+...

Well, this patch only works for '*', I want it more generalized,
at least for 's_test/x' .

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot
index 543400e8..6a7162c7 100644
--- a/src/interp/i-funsel.boot
+++ b/src/interp/i-funsel.boot
@@ -624,7 +624,7 @@ mmCost0(name, sig,cond,tar,args1,args2) ==
 
   -- try to favor homogeneous multiplication
 
---if name = "*" and 2 = #sigArgs and first sigArgs ~= first rest sigArgs then n := n + 1
+  if name = "*" and 2 = #sigArgs and first sigArgs ~= first rest sigArgs then n := n + 1
 
   -- because of obscure problem in evalMm, sometimes we will have extra
   -- modemaps with the wrong number of arguments if we want to the one

Reply via email to