Libraryless. Click here for Pure Java version (35L/1K).
1 | // use it only on inputs that are random ints |
2 | // always gives a positive number |
3 | static int mod_31bit(int n, int m) { |
4 | ret (n & 0x7FFFFFFF) % m; |
5 | } |
Began life as a copy of #1002512
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1036545 |
Snippet name: | mod_31bit |
Eternal ID of this version: | #1036545/1 |
Text MD5: | 03c2e6fa83b8b99824979437bfa649b3 |
Transpilation MD5: | 1dfbcb09cac6b2d90c8d917423714c24 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2023-02-12 14:43:06 |
Source code size: | 150 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 150 / 208 |
Referenced in: | [show references] |