PureBytes Links
Trading Reference Links
|
Although the hypertext documents in the message below would have you believe that this is a hardware problem (nice try, Microsoft), it's actually a software problem.
The programmers who designed MetaStock had to make some choices about the kinds of data (integers, fractions, etc.) that the program would be manipulating. They reasonably assumed that users would need access to non-integers. So all numbers are assumed to have a decimal point, followed by additional numbers (for example, an integer like 4 is treated as 4.0000). All of these numbers are expressed in scientific notation (as explained in the hypertext documents), which can be easily converted to machine language to be read by the computer hardware.
The issue is how much memory the program will allocate to each number. The less memory, the faster the program runs and the less space it occupies. However, larger numbers will be truncated, which results in loss of data and errors in arithmetic. For example, a number like 14 969 161 could be saved as 14 969 160 (i.e. rounded down). Similarly, 14.969161 could be saved as 14.96916.
Unfortunately, the programmers who designed MetaStock did not allocate enough memory to the numbers that the program is manipulating. In other words, the program is truncating the numbers that you have specified, leading to inaccurate results. That problem can only be corrected by the MetaStock programmers.
--Daniel
Richard Dale <richard@xxxxxxxxxxxxxxx> wrote:
It's due to MetaStock's use of single precision floating point numbers. It's a design limitation of PCs in general.
Even Microsoft acknowledge floating point number representation in PCs as a problem:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;78113
http://www.cpearson.com/excel/nding.htm
although Microsoft seem to have used double precision floating point numbers plus some optimisation to significantly minimise the problems.
Basically, for large numbers you can assume that the final few digits will be inaccurate with MetaStock. Single precision is accurate to around 7 significant digits. Perhaps one day Equis will use double precision floating point numbers.
Best regards,
Richard Dale.
Norgate Investor Services- Premium quality Stock, Futures and Foreign Exchange Data for markets in Australia, Asia, Europe, UK & USA -www.premiumdata.net
From: bichodomato67 [mailto:bichodomato67@xxxxxxxxxxx] Sent: Saturday, 27 March 2004 10:57 AMTo: equismetastock@xxxxxxxxxxxxxxxxxxxxxx: [EquisMetaStock Group] My metastock doesn´t know how to add
Hello,i´m using metastok 8.0.please take a look at this simple piece of codeerro:= 14 976 900+14 969 161;my metastock is giving me 29 946 060 for an answer.does anyone ever had the some problem?Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/equismetastock/
To unsubscribe from this group, send an email to:equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|