Re: Float comparison
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Thu, 07 May 2009 17:41:22 -0400
David Thompson wrote:
CBFalconer <cbfalconer@xxxxxxxxx> wrote:
Flash Gordon wrote:
... snip ...
You have also completely ignored the fact that I have presented
situations where the integer types *are* used as approximations.
So, is int just an approximation?
No, although it may be so used. It is intended to handle integers,
and, except for division, the set of integers is closed under
elementary arithmetic. People are quite familiar with the idea
that a division results in a quotient and a remainder, under which
condition the integer set remains closed.
So are the reals with the same exception.
True, but we are talking about FP representation (and int
representation), which have other limitations, including maximum
and minimum values. ints don't have a range associated with each
value, the adjacent integer value is always available. Reals don't
have an adjacent value, but rationals do (they are countable). The
FP system is built on rationals, but cannot express the adjacent
rational. Neither the integer nor the FP system can handle the
infinities that exist in arithmetic.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
.
- Follow-Ups:
- Re: Float comparison
- From: *** T. Winter
- Re: Float comparison
- From: Keith Thompson
- Re: Float comparison
- References:
- Re: Float comparison
- From: David Thompson
- Re: Float comparison
- Prev by Date: Re: Float comparison
- Next by Date: Re: comare tow int
- Previous by thread: Re: Float comparison
- Next by thread: Re: Float comparison
- Index(es):