DirectProduct has CancellationAbelianMonoid, if its second argument has it.


But call of subtractIfCan seemingly gives an infinite loop, if the
second argument is NNI, it works for INT:


Does anyone see what is going on here?

Regards

Johannes Grabmeier



(1) -> )read testPRDP
E := DirectProduct(6, INT)


   (1)  DirectProduct(6,Integer)
                                                                                
         
Type: Type
b1 : E := unitVector 1


   (2)  [1,0,0,0,0,0]
                                                                     
Type: DirectProduct(6,Integer)
E has AbelianGroup


   (3)  true
                                                                                
      
Type: Boolean
b1-b1


   (4)  [0,0,0,0,0,0]
                                                                     
Type: DirectProduct(6,Integer)

E' := DirectProduct(6, NNI)


   (5)  DirectProduct(6,NonNegativeInteger)
                                                                                
         
Type: Type
E' has AbelianGroup


   (6)  false
                                                                                
      
Type: Boolean
E' has CancellationAbelianMonoid


   (7)  true
                                                                                
      
Type: Boolean
a1 : E' := unitVector 1


   (8)  [1,0,0,0,0,0]
                                                           Type:
DirectProduct(6,NonNegativeInteger)
subtractIfCan(a1,a1)

INFO: Control stack guard page reprotected
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution

   >> System error:
   Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.

PROCEED WITH CAUTION.

(9) -> a1-a1
INFO: Control stack guard page reprotected
INFO: Control stack guard page unprotected
Control stack guard page temporarily disabled: proceed with caution

   >> System error:
   Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.

PROCEED WITH CAUTION.


-- 
Mit freundlichen Grüßen

Johannes Grabmeier

Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Tel. +49-(0)-991-3615-141 (d),  Fax: +49-(0)-32224-192688

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