PureBytes Links
Trading Reference Links
|
Hello,
Floating point accuracy limits are imposed by IEEE standards.
<A
href=""><FONT
face="Courier New"
color=#800080>http://www.math.grin.edu/~stone/courses/fundamentals/IEEE-reals.html
See also
<A
href="">http://groups.yahoo.com/group/amibroker/message/13179
and
<A
href="">http://groups.yahoo.com/group/amibroker/message/28513
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=gkavanagh@xxxxxxxxxxxxx
href="">Graham
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, April 14, 2003 11:36
AM
Subject: RE: [amibroker] Addition
<SPAN
>Bit hard to see the formula in the
GIF, colours are not contrasting enough.
<SPAN
>But I made similar post about this
recently in the past 2 weeks.
<SPAN
>So far nobody has responded to my
memory, except a similar one I made a long time ago when TJ said it had
something to do with the way numbers are stored in the OS. Same happens with
decimals, they are not seen as straight numbers as we see them. 5.4 can
actually be 5.399968. I have a large problem when I do rounding of numbers for
box sizes in P&F charts. I have had to force some numbers to read
correctly to make the correct X or O on the P&F. The example of 5.399968
is actually the real number of 5.4, but when I have Floor function it pulls it
back to 5.3. It may not sound much, but with P&F charts if it should be
5.4 then a new X is created, but the number inaccuracy stops
this.
<SPAN
>I work around this by using this
to create the close price I need for rising column in P&F . The main
problem is only when the box size is small <1.
<SPAN
lang=EN-AU
>CR =
<SPAN lang=EN-AU
>IIf<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(box==<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>0.1<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>AND<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>
(<SPAN lang=EN-AU
>ceil<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/box)*box-<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>floor<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/box)*box)><FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>0<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>ceil<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/box)*box,<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>floor<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/box)*box);
<SPAN
>
<SPAN
>I have been trying to find a way
to work around the large numbers, but have not found a solution as
yet
<SPAN
>I did do a test of the large
numbers to see what is actually being stored. So I did this little test and
found that the odd numbers were the same as the previous even number. Both are
seen as the same number when read back from the computer
memory
<SPAN lang=EN-AU
>Filter<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>=<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>;
<SPAN lang=EN-AU
>AddColumn<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>frac<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>19000004<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>10<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>""<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1.9<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>AddColumn<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>frac<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>19000005<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>10<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>""<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1.9<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>AddColumn<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>frac<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>19000006<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>/<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>10<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>""<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1.9<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN
lang=EN-AU
>
<SPAN
lang=EN-AU
>Results
<SPAN
>ADU
<SPAN
>14/04/2003<SPAN
>
0.375000000 0.375000000
0.625000000
<SPAN
>
<SPAN
lang=EN-AU
>Wish I had
an answer
<FONT face="Times New Roman" color=teal
size=3><SPAN
>Cheers,<FONT
color=teal size=3><SPAN
>Graham
<FONT
face="Times New Roman" color=#339966 size=2><SPAN
><A
href=""><SPAN
>http://groups.msn.com/ASXShareTrading
<FONT
face="Times New Roman" color=#339966 size=2><SPAN
><A
href=""><SPAN
>http://groups.msn.com/FMSAustralia
<SPAN
>-----Original
Message-----From: Dimitris
Tsokakis [mailto:TSOKAKIS@xxxxxxxxx] <SPAN
>Sent: Monday, 14 April 2003 4:54
PMTo:
amibroker@xxxxxxxxxxxxxxx<SPAN
>Subject: [amibroker]
Addition
<FONT face="Times New Roman"
size=3>
<FONT face="Times New Roman"
size=2>Any idea to improve the addition accuracy
?
<FONT face="Times New Roman"
size=2>Dimitris Tsokakis
<FONT face="Times New Roman"
size=3><SPAN
><FONT
face="Courier New" size=2>Send BUG REPORTS to
bugs@xxxxxxxxxxxxx<SPAN
><FONT
face="Courier New">Send SUGGESTIONS to
suggest@xxxxxxxxxxxxx<FONT
face="Courier New">-----------------------------------------<FONT
face="Courier New">Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx (Web
page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)<FONT
face="Courier New">--------------------------------------------<FONT
face="Courier New">Check group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of
Service.
Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|