The document says:
   random   : % -> %
      ++ random(n) creates a random element from 0 to \spad{n-1}.

That is good if n is positive.  What if n is negative?

(2) -> random(-5)

   >> System error:
   Argument is neither a positive integer nor a positive float: -5

Also this definition can't cover the case when n is 0.

I suggest to change the documentation and implementation to
return a random element from 0 to n.

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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to