On 25 Feb 2012, at 06:13, Asst. Prof. Dmitrii (Dima) Pasechnik wrote: > Dear all, > > it seems to me that functions like IsRat, etc are an artefact of very > old GAP versions, which lacked proper typing (I guess --- I started > using GAP almost 20 years ago, and I don't recall such details). > Instead of calling IsRat(x), one nowadays is better served by > containment predicate like
> x in Rationals Just to warn the Forum that internally this results in different things so in the long run the performance may be not the same: gap> for i in [1..10000000] do t := IsRat(42); od; time; 623 gap> for i in [1..10000000] do t := 42 in Rationals; od; time; 1861 though on a few calls the difference is unnoticeable. Best, Alexander _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum