{"action":"created","issue":{"url":"https://api.github.com/repos/cartazio/arithmoi/issues/35","repository_url":"https://api.github.com/repos/cartazio/arithmoi","labels_url":"https://api.github.com/repos/cartazio/arithmoi/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/cartazio/arithmoi/issues/35/comments","events_url":"https://api.github.com/repos/cartazio/arithmoi/issues/35/events","html_url":"https://github.com/cartazio/arithmoi/pull/35","id":171497480,"number":35,"title":"Bugfix and add quickcheck test for `sieveFactor` trial division","user":{"login":"ExpHP","id":1411280,"avatar_url":"https://avatars.githubusercontent.com/u/1411280?v=3","gravatar_id":"","url":"https://api.github.com/users/ExpHP","html_url":"https://github.com/ExpHP","followers_url":"https://api.github.com/users/ExpHP/followers","following_url":"https://api.github.com/users/ExpHP/following{/other_user}","gists_url":"https://api.github.com/users/ExpHP/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpHP/subscriptions","organizations_url":"https://api.github.com/users/ExpHP/orgs","repos_url":"https://api.github.com/users/ExpHP/repos","events_url":"https://api.github.com/users/ExpHP/events{/privacy}","received_events_url":"https://api.github.com/users/ExpHP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-16T19:27:58Z","updated_at":"2016-08-16T21:41:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cartazio/arithmoi/pulls/35","html_url":"https://github.com/cartazio/arithmoi/pull/35","diff_url":"https://github.com/cartazio/arithmoi/pull/35.diff","patch_url":"https://github.com/cartazio/arithmoi/pull/35.patch"},"body":"After much effort trying to decipher the trial division loop in `sieveFactor`, the only conclusion I could come to is that it cannot possibly work.  And it does not:\r\n\r\n```haskell\r\nimport Math.NumberTheory.Primes.Factorisation\r\nmain = print $ sieveFactor (factorSieve 15) 75 -- prints [(75,1)]\r\n```\r\n\r\nAs far as I can surmise, `toPrim` simply does not have anything to do with `FactorSieve` (it is for something that uses a much higher-order wheel optimization).\r\n\r\nThis commit also adds a quickcheck/smallcheck style test on a fairly small sieve (size 25) in a hope to exercise the trial division and curve factorization paths beyond just singular cases.\r\n\r\n---\r\nThis raises the question, how did #17 appear to fix #7 if it was still using the wrong indices?\r\n\r\nI was curious about this and also wanted to make sure that my \"fix\" wasn't just masking the issue by e.g. causing it to begin curve factorization too early.  After [debugging it with some traceShows](https://gist.github.com/ExpHP/6d8acbbd070ee8e67c71ebe0d87c8bc5), it appears that the 2048 case was merely fixed \"by chance\", as the majority of small odd numbers are prime. (so there is a high chance of `pix` fortituously being zero)"},"comment":{"url":"https://api.github.com/repos/cartazio/arithmoi/issues/comments/240248517","html_url":"https://github.com/cartazio/arithmoi/pull/35#issuecomment-240248517","issue_url":"https://api.github.com/repos/cartazio/arithmoi/issues/35","id":240248517,"user":{"login":"ExpHP","id":1411280,"avatar_url":"https://avatars.githubusercontent.com/u/1411280?v=3","gravatar_id":"","url":"https://api.github.com/users/ExpHP","html_url":"https://github.com/ExpHP","followers_url":"https://api.github.com/users/ExpHP/followers","following_url":"https://api.github.com/users/ExpHP/following{/other_user}","gists_url":"https://api.github.com/users/ExpHP/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpHP/subscriptions","organizations_url":"https://api.github.com/users/ExpHP/orgs","repos_url":"https://api.github.com/users/ExpHP/repos","events_url":"https://api.github.com/users/ExpHP/events{/privacy}","received_events_url":"https://api.github.com/users/ExpHP/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T21:41:38Z","updated_at":"2016-08-16T21:41:38Z","body":"@Bodigrim:\r\n\r\n> If yes, could you please note this difference near the definitions of *Sieve data types?\r\n\r\nI just added a comment which attempts to explain the differences.  I tried to squeeze in both the differences in usage and the apparent reasons behind them (to my best understanding), hopefully without turning it into a wall of text that nobody will read.  Is this good?"}}
{"actor":{"display_login":"ExpHP"}}