Two problems: First, unlike the interpreter, SPAD does not have
multiple assignment. The error message about "compColon" is the
compiler's poor way of trying to say that. Secondly, the DirectProduct
domain does not have a direction coercion from (...) tuple, List or
other similar domain. You need to explicitly call the 'directProduct'
function to create an instance.  It would probably be better if
DirectProduct exported a suitable function called 'construct'.

wspage@desktop:~/Downloads$ diff -au lab1.spad 'lab1(1).spad'
--- lab1.spad    2020-10-30 17:20:50.432221061 -0400
+++ lab1(1).spad    2020-10-30 17:20:18.928826110 -0400
@@ -20,8 +20,10 @@
             zero? n => a.1
             n = 1   => a.2
             n = 2   => a.3
-            (c1, c2, c3): Float := (x.1+x.2+x.3,
-(x.1*x.2+x.2*x.3+x.3*x.1), x.1*x.2*x.3)
+            c1: Float := x.1+x.2+x.3
+            c2: Float := -(x.1*x.2+x.2*x.3+x.3*x.1)
+            c3: Float := x.1*x.2*x.3
             for i in 3..n repeat
                 b: D := a
-                a := (b.2, b.3, c1*b.3 + c2*b.2 + c3*b.1)
+                a := directProduct([b.2, b.3, c1*b.3 + c2*b.2 + c3*b.1])
             a.3

On Fri, Oct 30, 2020 at 1:29 PM Neven Sajko <[email protected]> wrote:
>
> Hmm, I tried to implement lab1method2 with iteration with a for loop
> instead of with recursion, but now Fricas tells me this:
>
> Internal Error
> Unexpected error in call to system function compColon
>
> The package is again attached.
>
> Thank you,
> Neven
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/CAL%2BbK4M_BMeYA197K9YAKJvDVvXf705smyyk-Mwc%3D%2BQ4oF7G5w%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAC6x94Rrb1EU3Vd5Rwr1D8%2B9FTNETN8ZZMjuhtpNk_KT6feERg%40mail.gmail.com.

Reply via email to