asciilifeform: apeloyee: Shift(A, S mod W) leaks S mod W on machines without a barrel shifter.
asciilifeform: not only an idea, but afaik the only practical method that isn't W-shifts-by-1-with-mux
asciilifeform: this is in fact cheaper than knuth div.
asciilifeform: you shift by all possible whole word shifts, and mux-keep the correct one; then shift by all wordsize-1 possible subword shifts, and muxkeep the right one.
asciilifeform: hm i think i finally see what algo apeloyee was trying to implement ( the pseudocode doesn't actually do it )
asciilifeform: second, ~any~ wholeword shift leaks info re the shift amount, because different address sequence .
asciilifeform: first of all, didja ever say how to dispose of the 'while' statement ?
asciilifeform: there is no way around this, if you proceed after div0, you are in neverneverland. fortunately writing pcode where div0 demonstrably never happens, is not difficult.
asciilifeform: a div0 does not have a defined result, and any program that attempts it is resultingly nonsense. the ancients got this right.
asciilifeform: mircea_popescu: 'holes' in arithmetic suck, because they are inescapably branch conditionals. if i could not prove that div0 is impossible in the course of, e.g., modexp intermediate steps, ffa would be a wholly impossible thing.
asciilifeform: bad enuff that we gotta check every single motherfucking unknown integer for equality to 0, before feeding it into division or modulo
asciilifeform: ( modulo 0 is disallowed, it is same as a div0 )
asciilifeform: btw re nypd, oct. 23 2014 : 'Thanks to a massive $160 million investment, the New York City Police Department is on its way to receive a combination of up to 41,000 smartphones and tablets. Known as the NYPD Mobility Initiative, which will be mostly financed by criminal asset funds provided by the Manhattan DA's Office, the goal is to provide the the city's law enforcement with tools that can improve and streamline their overall work
asciilifeform: iirc state officials, even including governor, dun get crypto.