Questions on modular arithmetic functions in rat3a.lisp
Subject: Questions on modular arithmetic functions in rat3a.lisp
From: Camm Maguire
Date: Thu, 21 Jun 2012 09:35:42 -0400
Greetings!
1) The comments indicate that modulus is nil or positive. Is it always
an integer?
2) The comments indicate that if modulus is non-nil, the arguments to
ctimes (et.al. ?) are numberp and less than modulus. Are they in fact
integers? Are they bounded from below?
3) GCL has a C implementation of ctimes which balances modular
arithmetic between -modulus/2 and modulus/2. The generic lisp version
seems only to implement the upper bound. Is there a reason for this?
Is the modular balancing necessary?
4) Why is bctimes/rem used in cbexpt instead of ctimes/mod?
Take care,
--
Camm Maguire camm at maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah