[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Optimization



PureBytes Links

Trading Reference Links


Hi,
 
Thank you very much for your recommendations. 
Nothing works better than
a word from a friend. 
As for my retirement - I don't plan this any time 
soon. I am 32 now so you may expect
hundreds of upgrades :-)
 
Best regards,Tomasz Janeczko===============AmiBroker - the 
comprehensive share manager.<A 
href="">http://www.amibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
server 
not recognized 
To: <A title=amibroker@xxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Tuesday, November 06, 2001 3:30 
PM
Subject: Re: [amibroker] 
Optimization

Tomasz,
 
Good to see that "Nobody is perfect".  My 
"Fortran 90/95 for Scientists and Engineers" discusses this on pages 6 to9. 
Right after the pictures that show what a computer looks like.
 
BTW at last count I have reached twenty 
recommendations I have made to others to purchase.  Unfortunately, I 
realise now that if all AB users were to do this, pretty soon AB would 
have 100,000 users........and  Tomasz would retire to a warm and 
sunny place.
 
What to do?  Life is full of yin and 
yang.

<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Tomasz Janeczko 

To: <A title=amibroker@xxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, November 06, 200111:00 
PM
Subject: Re: [amibroker] 
Optimization

Hello,
 
The floating point arithmetic is 
sometime strange :-)
As you probably know decimal fractions 
could not be represented
accuratelly in the IEEE floating point 
format (only powers of 2
could be represented so 0.5, 0.25, 
0.125, 0.0625 ... are always precise).
Unfortuntatelly <FONT face="Arial Greek" 
size=2>0.1 can not be represented 100% accuratelly as
a power of 2. So it is in fact 
0.1000000000000000001 or something like that.
Then iterating this leads to 
0.800000000000000008 which is bigger than 0.8
so it is not included in the 
loop.
 
As integers are always represented 
correctly you may use the following
D1= 0.1 * 
Optimize("D1",5,5,8,1);
 
Alternativelly you can use 
this:
<FONT 
size=2>D1=Optimize("D1",0.5,0.5,0.80001,0.1);
 
Anyway, I will try to implement some 
improvements to workaround this problem
internally in AmiBroker.
 
Best regards,
Tomasz Janeczko
amibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Dimitris 
Tsokakis 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 

Sent: Tuesday, November 06, 2001 9:16 
AM
Subject: [amibroker] 
Optimization

Dear Tomasz,
I noticed that in
<FONT 
size=2>D1=Optimize("D1",0.5,0.5,0.8,0.1);
the result list had 
D1=0.5, 0.6, 0.7
In <FONT 
size=2>D1=Optimize("D1",0.5,0.5,0.6,0.01);
the result was complete
D1=0.5, 0.51, 0.52, ..., 0.59, 0.60
Is there any reason for the first case?
Best Regards
Dimitris TsokakisYour use ofYahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.