
1 Oct
2002
1 Oct
'02
8:33 a.m.
In an attempt to invent documentation for the GiNaC facilities we use, we came across the following inconsistency in the behavior of the method
bool numeric::is_prime(void) const
and the function
bool is_prime(const numeric &x),
whereby exit(1) is called (via cl_abort()) if the number to be tested is a non-positive integer. I believe is_prime() should return false in this case, as it does for, e.g., -2/7, 2/7, 3*I, and 2.8943657489. All the best
Roberto
P.S. I am not including a patch since this issues may be dealt with either in CLN (which I believe is the better option) or in GiNaC.
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it