should all floats be nonintegers?



On 12/17/2012 3:52 PM, Stavros Macrakis wrote:
> I'd say that floats represent /imprecise or approximate /numbers, so 
> 3.0 might mean exactly 3 or some other number in the interval 3-eps .. 
> 3+eps.
>
This is a commonly held view among "amateur" computing types, including 
any number of programming language fans, and for
that matter, physicists like Stephen Wolfram, but it doesn't work that 
well.

  I suspect that "professional"
numerical analysts would, by and large, say that floats represent 
exactly some particular number. That is,
3.0 represents exactly the quantity 3.   If you want to represent a 
numeric interval you can do so with two numbers, each of
which represents exactly some particular number.  e.g.  [2.5, 3.5].

If you start by saying 3.0  represents 3+-eps,  then what does 2.5 
endpoint mean?   2.5+-eps?  If it represents EXACTLY 2.5, then
you need a whole new number system of floats that mean what they say and 
not some fuzzball.
RJF



>        -s
>
> On Mon, Dec 17, 2012 at 6: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