To summarize what Bill and Ralf meant: it's because of interpreter
type selection:

-- use this to show type selection
)set mes bot on
-- ...
sx_test:=x*s_test
-- ...
 Function Selection for *
      Arguments: (VARIABLE(x), ANY)
   -> no function * found for arguments (VARIABLE(x), ANY)

 Function Selection for *
      Arguments: (VARIABLE(x), UPXS(EXPR(INT),x,0))

 [1]  signature:   (EXPR(INT), UPXS(EXPR(INT),x,0)) -> UPXS(EXPR(INT),x,0)
      implemented: slot $(Expression (Integer))$ from UPXS(EXPR(INT),x,0)
 [2]  signature:   (UPXS(EXPR(INT),x,0), UPXS(EXPR(INT),x,0)) ->
UPXS(EXPR(INT),x,0)
      implemented: slot $$$ from UPXS(EXPR(INT),x,0)


As you can see, for "x*s_test", it's possible to use
signature (EXPR(INT), UPXS(EXPR(INT),x,0)) -> UPXS(EXPR(INT),x,0),
or (UPXS(EXPR(INT),x,0), UPXS(EXPR(INT),x,0)) -> UPXS(EXPR(INT),x,0)

And interpreter chose first one.  A workaround is to make 'x' to
be type UPXS(EXPR(INT),x,0), that can be done by Bill's way
'series(x,x=0)', or Ralf's way "x: S := 'x".


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

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

Reply via email to