| 745 | // ---------------------------------------------------------------------------------------- |
| 746 | |
| 747 | const bigint_kernel_1 operator% ( |
| 748 | uint16 lhs, |
| 749 | const bigint_kernel_1& rhs |
| 750 | ) |
| 751 | { |
| 752 | typedef bigint_kernel_1 bigint; |
| 753 | // temp is zero by default |
| 754 | bigint::data_record* temp = new bigint::data_record(rhs.slack); |
| 755 | |
| 756 | if (rhs.data->digits_used == 1) |
| 757 | { |
| 758 | // if rhs is just an uint16 inside then perform the modulus |
| 759 | *(temp->number) = lhs % *(rhs.data->number); |
| 760 | } |
| 761 | else |
| 762 | { |
| 763 | // if rhs is bigger than lhs then the answer is lhs |
| 764 | *(temp->number) = lhs; |
| 765 | } |
| 766 | |
| 767 | return bigint_kernel_1(temp,0); |
| 768 | } |
| 769 | |
| 770 | // ---------------------------------------------------------------------------------------- |
| 771 |
nothing calls this directly
no test coverage detected