solve.particular

8 views
Skip to first unread message

Sid Andal

unread,
Dec 1, 2021, 2:25:09 PM12/1/21
to FriCAS - computer algebra system

The following file contains:

**** mysolv.input ****

F := PF 13

VF ==> Vector F
LZ ==> List Integer

fsol(a: List LZ, b: LZ): LZ ==_
  x := solve(a :: SquareMatrix(3, F), b :: VF).particular
  if x case VF then x :: LZ else [0,0,0] :: LZ

**** End of mysolv.input


The following run outputs an error:


(1) -> )r mysolv
F := PF 13
 

   (1)  PrimeField(13)

VF ==> Vector F
 
LZ ==> List Integer
 

fsol(a: List LZ, b: LZ): LZ ==_
  x := solve(a :: SquareMatrix(3, F), b :: VF).particular
  if x case VF then x :: LZ else [0,0,0] :: LZ
 
   Function declaration fsol : (List(List(Integer)), List(Integer)) ->
      List(Integer) has been added to workspace.
(5) ->
(5) -> fsol([[1,2,3],[5,7,9],[11,2,8]],[4,0,3])
 
   case is only used for Unions and the object on the left-hand side
      does not belong to a union.

(5) ->


Isn't solve.particular of Union type?

Bill Page

unread,
Dec 2, 2021, 12:39:38 PM12/2/21
to fricas...@googlegroups.com
Do not use _ at the end of the first line.

fsol(a: List LZ, b: LZ): LZ ==
  x := solve(a :: SquareMatrix(3, F), b :: VF).particular
  if x case VF then x :: LZ else [0,0,0] :: LZ
--
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 fricas-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/6a2be781-10a4-42a3-a13e-11d0f72071c7n%40googlegroups.com.

Grégory Vanuxem

unread,
Dec 2, 2021, 1:51:50 PM12/2/21
to fricas...@googlegroups.com
Bill,

Always here, and usually with good advices. Ralf too though. I love that.

No news from Waldek? I know they are badly vaccinated in Poland. Please not that. Am historically and intimately (my father) relied with Poland.

Greg

Reply all
Reply to author
Forward
0 new messages