4 ms·
Maybe some sort of strange hash function? It looks like it spreads the values fairly evenly from 0-23, while keeping nearby numbers separate. Here's what it loo
by harpastum 13y ago
Maybe some sort of strange hash function? It looks like it spreads the values fairly evenly from 0-23, while keeping nearby numbers separate. Here's what it looks like from 0-5:
http://www.wolframalpha.com/input/?i=plot+%28%28%28%28x+mod+7%29+×+13%29+mod+17%29+×+19%29+mod+23+from+0+to+5 http://www.wolframalpha.com/input/?i=plot+%28%28%28%28x+mod+...
If the input is only integers, the same pattern still appears:
http://www.wolframalpha.com/input/?i=plot+%28%28%28%28floor%28x%29+mod+7%29+×+13%29+mod+17%29+×+19%29+mod+23+from+0+to+20 http://www.wolframalpha.com/input/?i=plot+%28%28%28%28floor%...
- alexeiz 13y agoIt's a really poor hash function. The only possible values are: 0,3,6,10,13,17,19. You can quickly see that only 7 distinct values are possible because of the initial $number % 7.