{"content":{"sharePage":{"page":0,"digests":[{"id":"16498007","dateCreated":"1257487597","smartDate":"Nov 5, 2009","userCreated":{"username":"EricMullins","url":"https:\/\/www.wikispaces.com\/user\/view\/EricMullins","imageUrl":"https:\/\/www.wikispaces.com\/i\/user_none_lg.jpg"},"monitored":false,"locked":false,"links":{"self":"https:\/\/chessprogramming.wikispaces.com\/share\/view\/16498007"},"dateDigested":1531478378,"startDate":null,"sharedType":"discussion","title":"bitscan broken on wiki page (Walter Faxon bitscan)","description":"I recently got interested in bitscans due to porting RobboLito to my router. There weren't any scans in the source that worked, so I found my way here.
\n
\nIn testing various versions, I discovered the Walter Faxon bitscan doesn't return correct results, at least the version presented here. I kind of left it alone after that but got re-interested in it and found my way to this page:
\n
\n http:\/\/www.stmintz.com\/ccc\/index.php?id=265635<\/a>
\n
\nThat version gave correct results, and was quite fast in my testing. Scrutinizing the differences, I determined the comment from that page about ommitting a line to retain the LSB was wrong. That line *must* be included to give correct results. It may be possible to save cyles by changing the routine to preserve the LSB, but the line cannot simply be removed without causing an incorrect result.
\n
\nAlso, the version at the above link uses unsigned char for a reason. That typedef\/cast was necessary in my tests.","replyPages":[{"page":0,"digests":[{"id":"16498651","body":"Thanks Eric for pointing that out. I will be corrected immediately.
\n
\nGerd","dateCreated":"1257489734","smartDate":"Nov 5, 2009","userCreated":{"username":"GerdIsenberg","url":"https:\/\/www.wikispaces.com\/user\/view\/GerdIsenberg","imageUrl":"https:\/\/www.wikispaces.com\/user\/pic\/1202793136\/GerdIsenberg-lg.jpg"}},{"id":"16534563","body":"We can still omit the line to retain the LSB:
\nbb ^ (bb-1)
\nresults in all bits below LS1B including it. While
\nbb = (bb-1) ^ (bb & (bb-1));
\nresults in all bits below LS1B excluding LS1B, thus only a cyclic index translation, therefor the decremented indices in LSB_64_table where 0 became 63.","dateCreated":"1257544079","smartDate":"Nov 6, 2009","userCreated":{"username":"GerdIsenberg","url":"https:\/\/www.wikispaces.com\/user\/view\/GerdIsenberg","imageUrl":"https:\/\/www.wikispaces.com\/user\/pic\/1202793136\/GerdIsenberg-lg.jpg"}}],"more":0}]},{"id":"4545625","dateCreated":"1212600709","smartDate":"Jun 4, 2008","userCreated":{"username":"Pradu","url":"https:\/\/www.wikispaces.com\/user\/view\/Pradu","imageUrl":"https:\/\/www.wikispaces.com\/user\/pic\/1202793136\/Pradu-lg.jpg"},"monitored":false,"locked":false,"links":{"self":"https:\/\/chessprogramming.wikispaces.com\/share\/view\/4545625"},"dateDigested":1531478378,"startDate":null,"sharedType":"discussion","title":"Asserts","description":"Would it be better to place asserts after variable declarations? This way the routines would also compile with C compilers.","replyPages":[{"page":0,"digests":[{"id":"4554047","body":"Ok, feel free to change it.","dateCreated":"1212656049","smartDate":"Jun 5, 2008","userCreated":{"username":"GerdIsenberg","url":"https:\/\/www.wikispaces.com\/user\/view\/GerdIsenberg","imageUrl":"https:\/\/www.wikispaces.com\/user\/pic\/1202793136\/GerdIsenberg-lg.jpg"}}],"more":0}]},{"id":"4516529","dateCreated":"1212421483","smartDate":"Jun 2, 2008","userCreated":{"username":"Pradu","url":"https:\/\/www.wikispaces.com\/user\/view\/Pradu","imageUrl":"https:\/\/www.wikispaces.com\/user\/pic\/1202793136\/Pradu-lg.jpg"},"monitored":false,"locked":false,"links":{"self":"https:\/\/chessprogramming.wikispaces.com\/share\/view\/4516529"},"dateDigested":1531478378,"startDate":null,"sharedType":"discussion","title":"Walter Faxon bitscan","description":"t64 undeclared","replyPages":[{"page":0,"digests":[{"id":"4541293","body":"oups should be bb","dateCreated":"1212573486","smartDate":"Jun 4, 2008","userCreated":{"username":"GerdIsenberg","url":"https:\/\/www.wikispaces.com\/user\/view\/GerdIsenberg","imageUrl":"https:\/\/www.wikispaces.com\/user\/pic\/1202793136\/GerdIsenberg-lg.jpg"}}],"more":0}]}],"more":false},"comments":[]},"http":{"code":200,"status":"OK"},"redirectUrl":null,"javascript":null,"notices":{"warning":[],"error":[],"info":[],"success":[]}}