Re: Can someone please explain - real numbers
- From: Paul W <noemail@xxxxxxxxx>
- Date: Wed, 08 Nov 2006 06:27:37 +0000
On Tue, 07 Nov 2006 21:10:16 +0000, Paul W <noemail@xxxxxxxxx> wrote:
Can someone please explain in simple terms (!) why:-
var
a:real;
begin
a:=2.21;
if a=2.21 then showmessage('You do not see this');
end;
Why?
Thanks for all the replies.
Clearly I know nothing about how a computer stores "real" numbers.
Even after all this time!
It just amazes me that telling a computer to store a value of 2.21
(effectively 2.210000000 recurring) it decides to store a value like
2.211189899324 (or whatever). I thought the whole point of computers
is they were accurate for this sort of thing.
So I can use extended (is that spot on then?), but then what on earth
is the point of "real" numbers if they're not accurate?
My apologies in advance for my ignorance!
.
- Follow-Ups:
- Re: Can someone please explain - real numbers
- From: Sven Pran
- Re: Can someone please explain - real numbers
- From: Nicholas Sherlock
- Re: Can someone please explain - real numbers
- References:
- Can someone please explain - real numbers
- From: Paul W
- Can someone please explain - real numbers
- Prev by Date: Re: Can someone please explain - real numbers
- Next by Date: Re: Can someone please explain - real numbers
- Previous by thread: Re: Can someone please explain - real numbers
- Next by thread: Re: Can someone please explain - real numbers
- Index(es):
Relevant Pages
|