IntSqrtRem
IntSqrtRem
Description
Compute the integer square root and remainder.
Parameters
| Name | Direction | Description |
|---|---|---|
root |
out | Destination for the root |
remainder |
out | Destination for the remainder |
value |
in | Input value |
Usage example (from documentation)
IntSqrtRem(&root, &rem, &value);Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:1272:
}
void IntSqrtRem(Int *root, Int *remainder, Int *value) {
IntRootRem(root, remainder, value, 2);
}- In
Int.c:1287:
bool result = false;
IntSqrtRem(&root, &remainder, value);
result = IntIsZero(&remainder);- In
Int.Math.c:501:
bool test_int_sqrt_rem(void) {
WriteFmt("Testing IntSqrtRem\n");
Int value = IntFrom(200);- In
Int.Math.c:507:
Int remainder = IntInit();
IntSqrtRem(&root, &remainder, &value);
bool result = IntToU64(&root) == 14;
Last updated on