Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, VoroneTZ, Quad), 901 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
optimize() bug? #451346
05/02/15 23:38
05/02/15 23:38
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl. In Test, this script:

Code:
void	run() {
	set(PARAMETERS);
	int	i = optimize(100,1,500,20);
	int	j = optimize(100,1.500,20);
	printf("\ni,j=%i,%i",i,j);
	quit();
}



produces "i,j=100,20".

The typo in the j optimize call causes the min to be 1.5 and the max to be 20, with no step. Why is 20 returned rather than 100 in Test? The manual seems to say that start may be outside min..max...

Thanks.

Re: optimize() bug? [Re: DdlV] #451359
05/04/15 10:54
05/04/15 10:54
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, I don't think that the start can be outside the valid range.

Re: optimize() bug? [Re: jcl] #451362
05/04/15 14:28
05/04/15 14:28
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl. OK, then rather than the current ">0" (which is already incorrect given the <0 facility), the manual should say min<=abs(start)<=max?

Thanks.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1