Re: Really strange problem, for very bright people
"jimdelilah" <[email protected]> Fri, 08 Aug 2003 15:23:35 -0000
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
This may or may not help you understand.
Try this and see what value is in vCalc_e2 when the code executes.
var vCalc_e2 : Extended;
begin
vCalc_e2 := 239.752763879; // line 1
if (vCalc_e2 = 0) Then // line 2
ShowMessage(' equals 0 ');
end
you will see (at line 2)that vCalc_e2 will be 239.75276388.
vCalc_e2 := 239.752763879; // line 1
vCalc_e2 = 239.75276388;
This is because there is a *huge* set of numbers that cannot be
represented in 8 or 10 bytes of data. It is kinda like trying to
draw a rainbow with a box of 10 crayons. Sure you can get someting
close, but under close exanimation you will see that the resolution
is poor.
--- In [email protected], Stephen Wood
<stephenw@d...> wrote:
> Thanks guys for the answers, I'm getting the picture, yet not fully
> understanding it yet.....I'll get there though....
>
> Thanks!!
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->
CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/