On 12/17/2012 4:35 PM, David Stoutemyer wrote:
> I like to use a separate phrase "whole number", leaving "integer" to
> also imply a type.
> Thus wholenumberp(3.0) and wholenumberp(3) both return true, whereas
> integerp(3.0) returns false.
> -- best regards, david stoutemyer
>
I think this is a good point -- that if you care about the data type
(storage format), that one should be
able to distinguish the type by SOME test. It should be possible to ask
if a number is stored as a (say) 64 bit floating point
object or as a 16 bit binary fixed point number object.
Given that the language of applied mathematics usually pertains to
content rather than data type, perhaps we could use
the terms rational and integer for math while using float,
single-float, double-float, fixed, ... for data type?
[what to do about reals which are irrational or transcendental? is the
symbol %pi a real??]
RJF
>
> On Mon, Dec 17, 2012 at 1:36 PM, Barton Willis <willisb at unk.edu
> <mailto:willisb at unk.edu>> wrote:
>
> Maxima says that real floats are noninteger. There are arguments
> for and against this, I think. Of course for binary64 numbers 3.0 = 3
> is 100% true. I have been goofing around with the nonintegerp
> function--ahh it would be a great deal easier to keep the policy that
> floats are noninteger, by the way :)
>
> (%i3) map(lambda([s],featurep(s,'noninteger)),[x,%pi, 2/3,
> sqrt(42), 3.0, 6.0b0, [], [5]]);
> (%o3) [false,true,true,true,true,true,false,false]
>
> --Barton (who blames all recent mistakes on a bad cold).
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu <mailto:Maxima at math.utexas.edu>
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima