Improvement to nonintegerp (was: Improvement to askinteger for review/comment)
Subject: Improvement to nonintegerp (was: Improvement to askinteger for review/comment)
From: Dieter Kaiser
Date: Fri, 16 Oct 2009 00:09:12 +0200
Am Donnerstag, den 15.10.2009, 14:26 +1100 schrieb Billinghurst, David
(RTATECH):
> maxima-integerp and nonintegerp both return false for "don't know".
> featurep(sqrt(3),integer) -> false
> featurep(sqrt(3),noninteger) -> false
>
> I now believe the correct solution is to extend nonintegerp, which
> is called by askinteger. With this change
> featurep(sqrt(3),integer) -> false
> featurep(sqrt(3),noninteger) -> true
Yes, I think this make sense. Both functions are now consistent for this
case. I have not seen this possible solution to the problem.
> I was unsure if this would work for sqrt(N^2) when N is a large
> integer, after inspecting the code and some testing I now think it
> is OK. I tested several cases near N^2 where N is a large Mersenne
> prime.
>
> OK to commit this?
I have no further comments. I think the extension of nonintegerp is
useful.
Dieter Kaiser