Post Reply 
Ranks calculation
11-01-2024, 09:38 AM (This post was last modified: 11-01-2024 10:13 AM by Albert Chan.)
Post: #10
RE: Ranks calculation
(11-01-2024 09:04 AM)robmio Wrote:  Unfortunately, there is an error in the following program, and I can't figure out what it is:

Off-by-1 error (Lua code use i<hi, with same effect)
i≠hi guard is to *ALWAYS* update last ranking. (*)

< IF j≠hi AND m2[ii][1]==m2[j][1] THEN
> IF ii≠hi AND m2[ii][1]==m2[j][1] THEN

(*) It is weird bad code does not generate Index outside range error, when j = hi+1

Update: fixed typo, should be ii instead of i
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Ranks calculation - robmio - 10-31-2024, 01:39 PM
RE: Ranks calculation - Albert Chan - 10-31-2024, 02:38 PM
RE: Ranks calculation - robmio - 10-31-2024, 02:46 PM
RE: Ranks calculation - robmio - 10-31-2024, 02:50 PM
RE: Ranks calculation - Albert Chan - 10-31-2024, 04:41 PM
RE: Ranks calculation - robmio - 10-31-2024, 08:16 PM
RE: Ranks calculation - Albert Chan - 10-31-2024, 08:42 PM
RE: Ranks calculation - robmio - 11-01-2024, 07:41 AM
RE: Ranks calculation - robmio - 11-01-2024, 09:04 AM
RE: Ranks calculation - Albert Chan - 11-01-2024 09:38 AM
RE: Ranks calculation - robmio - 11-01-2024, 10:03 AM
RE: Ranks calculation - Albert Chan - 11-01-2024, 10:34 AM
RE: Ranks calculation - robmio - 11-01-2024, 10:04 AM



User(s) browsing this thread: 1 Guest(s)