| 768 | // ------------------------------------------------ |
| 769 | |
| 770 | void Int::Rand(int nbit) { |
| 771 | |
| 772 | CLEAR(); |
| 773 | |
| 774 | uint32_t nb = nbit/32; |
| 775 | uint32_t leftBit = nbit%32; |
| 776 | uint32_t mask = 1; |
| 777 | mask = (mask << leftBit) - 1; |
| 778 | uint32_t i=0; |
| 779 | for(;i<nb;i++) |
| 780 | bits[i]=rndl(); |
| 781 | bits[i]=rndl()&mask; |
| 782 | |
| 783 | } |
| 784 | |
| 785 | // ------------------------------------------------ |
| 786 |
no test coverage detected