PureBytes Links
Trading Reference Links
|
Tomasz,
Good to see that "Nobody is perfect". My
"Fortran 90/95 for Scientists and Engineers" discusses this on pages 6 to 9.
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@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, November 06, 2001 11:00
PM
Subject: Re: [amibroker]
Optimization
Hello,
The floating point arithmetic issometime
strange :-)
As you probably know decimal fractions
could not be represented
accuratelly in the IEEE floatingpoint
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@xxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, November 06, 20019: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 of Yahoo!
Groups is subject to the Yahoo!
Terms of Service. Your use of Yahoo! Groups
is subject to the Yahoo! Terms of
Service.
|