![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re^3: Random 1-1 mappingby QM (Parson) |
on May 28, 2006 at 19:56 UTC ( #552210=note: print w/replies, xml ) | Need Help?? |
1) Did this code/idea help you?
2) You need an offset if zero is involved. 3) Yes, multiplying by a prime mod some other prime will do what you want. There are probably several other configurations that will do the same, and some will be better than what I've given. There are numerous approaches, rules, tests, and other info that you can dig up. I'd start with Mathworld or Wikipedia. -QM
In Section
Seekers of Perl Wisdom
|
|