Re: [q-lang-users] Q 7.2 RC 1 issue 1: Nomenclature
Brought to you by:
agraef
From: John C. <co...@cc...> - 2006-06-19 21:34:27
|
Albert Graef scripsit: > So we'll have to change the name of the semantic predicates then. Any > suggestions? How about intp, rationalp, realp, complexp? Looks familiar > to Lisp programmers, non-Lispers will surely hate it, but it is short > and at least reminiscent of the Scheme functions. These are the representational predicates in Lisp rather than the number-theoretic ones, though they can mostly do the work of both because Lisp aggressively reduces complex representations to real and rational representations to integer when possible. I have two suggestions, neither of which I am wild about. One is is "isintval", "isratval", etc. This is verbose but clear: it's about values, not representations. The other is cleverer and can't be confused with the existing predicates, but may be *too* clever: "isinZ", "isinQ", "isinR", "isinC". That reminds me that the rules for isintnum, isratnum, and isrealnum when applied to type Complex do not check that the imaginary form is an *exact* 0. As I pointed out before, an inexact 0 is really a representation for any number n such that -d < n < d, where d is the smallest positive float. -- Samuel Johnson on playing the violin: John Cowan "Difficult do you call it, Sir? co...@cc... I wish it were impossible." http://www.ccil.org/~cowan |