[Maxima] Is %i an integer? - Adding more facts to the database
drdieterkaiser at web.de
Sun Jun 28 18:27:58 CDT 2009
Am Sonntag, den 28.06.2009, 22:53 +0100 schrieb Leo Butler:
> < Therefore, from the viewpoint of the implemented function featurep a symbol
> < which is declared to be real is also a noninteger.
> Not exactly.
> < For the practical aim of programming it is necessary to have a convention which
> < will work. We might change the behavior of featurep or we might use it as it is
> < and document the behavior better.
> It seems to me that there is a convention and it is reasonable:
> if x is declared to be in a set, but not explicitly declared to be
> in a subset, then it is assumed not to be in the subset.
> The only other convention would be to respond 'unknown'. This would
> require one to ask for clarification or handle each case (t/f).
> I think it would be more sensible to introduce, for each type, its
> negation. At the moment, we have this for even/odd and
My first idea was to implement the pair integer/noninteger the same way
as the pair rational/irrational. When we do this, we have to change the
function nonintegerp as a consequence.
We can do it another way:
We do not change the implementation of noninteger. Then we can implement
the following declarations:
(kind $%i $imaginary)
(kind $%i $noninteger)
(kind $%pi $real)
(kind $%pi $noninteger)
And we will get again:
Then we should discuss if the implementation of the pair
rational/irrational is consistent with this solution.
More information about the Maxima