[Python-Dev] Revamping Python's Numeric Model
Charles G Waldman
Sat, 4 Nov 2000 09:21:02 -0600 (CST)
Moshe Zadka writes:
> MAL > Not sure what you mean here: perhaps .isexact() <=> can be
> MAL > represented in IEEE ?
> No, I meant "not represented exactly". The real meaning for that (one
> that we might or might not promise) is that it's a float. It's a place
> where the numeric model takes the easy way out <wink>.
Hmm, I like almost everything about your proposal. The above point
bothers me slightly. Are you saying (1.0).isexact() == 0?
Also, how about long integers? Will they, under your new proposal, be
indistinguisable from regular ints? While this has some appeal to it
it would be problematic for C extension modules.
Finally, although I'm no Schemer, the hierarchy you suggest sounds
very Schemish to me - I know they have a similar hierarchy of numeric
types with some of these same predicates to test for integrality,
rationality, reality, exactness - maybe there is something to be
learned by studying the Scheme model?