login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Submitted by : (unknown) at: 2007-11-17T22:56:20-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

fricas
(1) -> *(A: Set INT, B: Set INT): Set INT == set concat [[(a*b)$Integer for a in members A] for b in members B]
Function declaration ?*? : (Set(Integer), Set(Integer)) -> Set( Integer) has been added to workspace.
Type: Void
fricas
2*3
fricas
Compiling function * with type (Set(Integer), Set(Integer)) -> Set(
      Integer) 
   Conversion failed in the compiled user function * .
Cannot convert the value from type Integer to Set(Integer) .

This problem is not related to *.

fricas
mulset(A: Set INT, B: Set INT): Set INT == set concat [[(a*b)$Integer for a in members A] for b in members B]
Function declaration mulset : (Set(Integer), Set(Integer)) -> Set( Integer) has been added to workspace.
Type: Void
fricas
mulset(2,3)
fricas
Compiling function mulset with type (Set(Integer), Set(Integer)) -> 
      Set(Integer) 
   Conversion failed in the compiled user function mulset .
Cannot convert the value from type Integer to Set(Integer) .

It works if conversion from Integer to set is explicit.

fricas
set [2] * set [3]

\label{eq1}\left\{ 6 \right\}(1)
Type: Set(Integer)

overloading an operation in the interpreter is a problem --kratt6, Mon, 29 Oct 2007 08:53:07 -0600 reply
Why doesn't axiom find *: (INT, INT) -> INT anymore?

that is a problem. :-)

But you have overridden the default behaviour in the interpreter. It is ok if you are explicit:

fricas
(2*3)$Integer

\label{eq2}6(2)
Type: Integer

So I think probably the current behavior is sensible.

better title --kratt6, Mon, 29 Oct 2007 09:19:05 -0600 reply
Name: #387 redefining * => #387 overloading functions in the interpreter does not work




  Subject: (replying)   Be Bold !!
  ( 15 subscribers )  
Please rate this page: