Firas Kraiem has understood correctly about my wondering why a naive Fermat
test is *slower* than ispseudoprime(). I thank K.B. for correctly explaining the reasons.
Is there any way to improve speed of Fermat test?.
In addition my suggestion is to include Fermat pseudoprime test as an option in ispseudoprime() function through Flag.