IntRootRem
IntRootRem
Description
Compute an integer root and the leftover remainder.
Parameters
| Name | Direction | Description |
|---|---|---|
root |
out | Destination for the root |
remainder |
out | Destination for the remainder |
value |
in | Input value |
degree |
in | Root degree |
Usage example (from documentation)
IntRootRem(&root, &rem, &value, 3);Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:1163:
}
void IntRootRem(Int *root, Int *remainder, Int *value, u64 degree) {
ValidateInt(root);
ValidateInt(remainder);- In
Int.c:1267:
Int remainder = IntInit();
IntRootRem(&root, &remainder, value, degree);
IntDeinit(&remainder);
int_replace(result, &root);- In
Int.c:1273:
void IntSqrtRem(Int *root, Int *remainder, Int *value) {
IntRootRem(root, remainder, value, 2);
}- In
Int.c:1309:
bool exact = false;
IntRootRem(&root, &remainder, value, degree);
exact = IntIsZero(&remainder);- In
Int.Math.c:468:
bool test_int_root_rem(void) {
WriteFmt("Testing IntRootRem\n");
Int value = IntFrom(200);- In
Int.Math.c:474:
Int remainder = IntInit();
IntRootRem(&root, &remainder, &value, 3);
bool result = IntToU64(&root) == 5;- In
Int.Math.c:858:
Int remainder = IntInit();
IntRootRem(&root, &remainder, &value, 0);
return false;
}
Last updated on