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