IntFrom
Description
Convert a native integer into an arbitrary-precision integer. Dispatches on the type of value.
Aborts when a signed input is negative.
Parameters
| Name | Direction | Description |
|---|---|---|
value |
in | Signed or unsigned integer source value |
Usage example (from documentation)
Int value = IntFrom(1234u);Success
Returns Integer holding the same non-negative value.
Failure
LOG_FATAL when a signed value is negative (the non-negative IntFrom contract is violated). Allocator failures on the underlying construction abort through the allocator’s standard failure path.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.Access.c:53:
Int zero = IntInit(&alloc.base);
Int non_zero = IntFrom(1, &alloc.base);
bool result = IntIsZero(&zero);- In
Int.Access.c:69:
DefaultAllocator alloc = DefaultAllocatorInit();
Int one = IntFrom(1, &alloc.base);
Int two = IntFrom(2, &alloc.base);- In
Int.Access.c:70:
Int one = IntFrom(1, &alloc.base);
Int two = IntFrom(2, &alloc.base);
bool result = IntIsOne(&one);- In
Int.Access.c:86:
DefaultAllocator alloc = DefaultAllocatorInit();
Int even = IntFrom(42, &alloc.base);
Int odd = IntFrom(43, &alloc.base);- In
Int.Access.c:87:
Int even = IntFrom(42, &alloc.base);
Int odd = IntFrom(43, &alloc.base);
bool result = IntIsEven(&even);- In
Int.Access.c:105:
DefaultAllocator alloc = DefaultAllocatorInit();
Int small = IntFrom(UINT64_MAX, &alloc.base);
Int big = IntFrom(1, &alloc.base);- In
Int.Access.c:106:
Int small = IntFrom(UINT64_MAX, &alloc.base);
Int big = IntFrom(1, &alloc.base);
IntShiftLeft(&big, 64);- In
Int.Access.c:124:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(1025, &alloc.base);
bool error = true;- In
Int.Access.c:157:
DefaultAllocator alloc = DefaultAllocatorInit();
Int one = IntFrom(1, &alloc.base);
Int power = IntFrom(1, &alloc.base);
Int other = IntFrom(24, &alloc.base);- In
Int.Access.c:158:
Int one = IntFrom(1, &alloc.base);
Int power = IntFrom(1, &alloc.base);
Int other = IntFrom(24, &alloc.base);
Int zero = IntInit(&alloc.base);- In
Int.Access.c:159:
Int one = IntFrom(1, &alloc.base);
Int power = IntFrom(1, &alloc.base);
Int other = IntFrom(24, &alloc.base);
Int zero = IntInit(&alloc.base);- In
Int.Convert.c:40:
bool test_int_from_unsigned_integer(void) {
WriteFmt("Testing IntFrom with unsigned integer\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Int.Convert.c:44:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(13, ALLOCATOR_OF(&alloc));
Str text = IntToBinary(&value); DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(0xBEEF, ALLOCATOR_OF(&alloc));
Str text = IntToStrRadix(&value, 16, true); alloc.base.retry_limit = 4;
Int value = IntFrom(0xBEEF, ALLOCATOR_OF(&alloc));
ok = int_try_to_str_radix(&text, &value, 16, true, ALLOCATOR_OF(&alloc));
Int lhs = IntFromBinary("0001011", ALLOCATOR_OF(&alloc));
Int rhs = IntFrom(11, ALLOCATOR_OF(&alloc));
bool result = IntCompare(&lhs, &rhs) == 0; DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(1, ALLOCATOR_OF(&alloc));
u64 out = 0;
bool error = false; DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(255, ALLOCATOR_OF(&alloc));
Str text = IntToStrRadix(&value, 37, false); DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(1, ALLOCATOR_OF(&alloc));
IntToBytesLE(&value, NULL, 1);
DefaultAllocatorDeinit(&alloc); DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(1, ALLOCATOR_OF(&alloc));
u8 byte = 0; Float value = FloatFromStr("12.5", &alloc.base);
Float same = FloatFromStr("12.5", &alloc.base);
Int whole = IntFrom(12, &alloc.base);
Int next = IntFrom(13, &alloc.base); Float same = FloatFromStr("12.5", &alloc.base);
Int whole = IntFrom(12, &alloc.base);
Int next = IntFrom(13, &alloc.base);
bool result = (FloatCompare(&value, &same) == 0);
Float value = FloatFromStr("123.45", ALLOCATOR_OF(&alloc));
Int result_value = IntFrom(99, ALLOCATOR_OF(&alloc));
bool result = !FloatToInt(&result_value, &value);
Float value = FloatFromStr("-42", ALLOCATOR_OF(&alloc));
Int result_value = IntFrom(99, ALLOCATOR_OF(&alloc));
bool result = !FloatToInt(&result_value, &value);- In
Io.Write.c:597:
Int hex_val = IntFromHexStr("deadbeefcafebabe1234", alloc_base);
Int bin_val = IntFromBinary("10100011", alloc_base);
Int oct_val = IntFrom(493, alloc_base);
StrAppendFmt(&output, "{}", big_dec);- In
Float.Math.c:102:
Float a = FloatFromStr("1.25", &alloc.base);
Float b = FloatFromStr("0.75", &alloc.base);
Int whole = IntFrom(2, &alloc.base);
Float result_value = FloatInit(&alloc.base);
Str text = StrInit(&alloc.base);- In
Float.Math.c:197:
Float a = FloatFromStr("5.5", &alloc.base);
Float b = FloatFromStr("0.5", &alloc.base);
Int whole = IntFrom(2, &alloc.base);
Float result_value = FloatInit(&alloc.base);
Str text = StrInit(&alloc.base);- In
Float.Math.c:287:
Float a = FloatFromStr("1.5", &alloc.base);
Float b = FloatFromStr("2", &alloc.base);
Int whole = IntFrom(2, &alloc.base);
Float result_value = FloatInit(&alloc.base);
Str text = StrInit(&alloc.base);- In
Float.Math.c:377:
Float a = FloatFromStr("7.5", &alloc.base);
Float b = FloatFromStr("2.5", &alloc.base);
Int whole = IntFrom(3, &alloc.base);
Float result_value = FloatInit(&alloc.base);
Str text = StrInit(&alloc.base);- In
Int.Compare.c:21:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(41, &alloc.base);
Int b = IntFrom(42, &alloc.base);
Int c = IntFromBinary("000101010", &alloc.base);- In
Int.Compare.c:22:
Int a = IntFrom(41, &alloc.base);
Int b = IntFrom(42, &alloc.base);
Int c = IntFromBinary("000101010", &alloc.base);- In
Int.Compare.c:41:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(41, &alloc.base);
Int b = IntFrom(42, &alloc.base);
Int c = IntFromBinary("000101010", &alloc.base);- In
Int.Compare.c:42:
Int a = IntFrom(41, &alloc.base);
Int b = IntFrom(42, &alloc.base);
Int c = IntFromBinary("000101010", &alloc.base);- In
Int.Compare.c:66:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(42, &alloc.base);
Int same = IntFromBinary("00101010", &alloc.base);
Int big = IntFrom(1, &alloc.base);- In
Int.Compare.c:68:
Int value = IntFrom(42, &alloc.base);
Int same = IntFromBinary("00101010", &alloc.base);
Int big = IntFrom(1, &alloc.base);
IntShiftLeft(&big, 80);- In
Int.Compare.c:97:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(42u, &alloc.base);
Int b = IntFromBinary("101010", &alloc.base);
Int c = IntFrom(0u, &alloc.base);- In
Int.Compare.c:99:
Int a = IntFrom(42u, &alloc.base);
Int b = IntFromBinary("101010", &alloc.base);
Int c = IntFrom(0u, &alloc.base);
Int d = IntFrom(0u, &alloc.base); Int b = IntFromBinary("101010", &alloc.base);
Int c = IntFrom(0u, &alloc.base);
Int d = IntFrom(0u, &alloc.base);
bool result = (int_hash(&a, 0) == int_hash(&b, 0)); DefaultAllocator alloc = DefaultAllocatorInit();
Int zero = IntFrom(0u, &alloc.base);
Int one = IntFrom(1u, &alloc.base);
Int small = IntFrom(42u, &alloc.base);
Int zero = IntFrom(0u, &alloc.base);
Int one = IntFrom(1u, &alloc.base);
Int small = IntFrom(42u, &alloc.base);
Int large = IntFrom(1u, &alloc.base); Int zero = IntFrom(0u, &alloc.base);
Int one = IntFrom(1u, &alloc.base);
Int small = IntFrom(42u, &alloc.base);
Int large = IntFrom(1u, &alloc.base);
IntShiftLeft(&large, 80); Int one = IntFrom(1u, &alloc.base);
Int small = IntFrom(42u, &alloc.base);
Int large = IntFrom(1u, &alloc.base);
IntShiftLeft(&large, 80);
Int decimal = IntFromStr("12345678901234567890", &alloc.base); Map(Int, u64) counts = MapInit(int_hash, int_compare, &alloc);
Int k1 = IntFrom(100u, &alloc.base);
Int k2 = IntFrom(200u, &alloc.base);
Int k3 = IntFrom(100u, &alloc.base); // duplicate of k1 by value
Int k1 = IntFrom(100u, &alloc.base);
Int k2 = IntFrom(200u, &alloc.base);
Int k3 = IntFrom(100u, &alloc.base); // duplicate of k1 by value
Int k1 = IntFrom(100u, &alloc.base);
Int k2 = IntFrom(200u, &alloc.base);
Int k3 = IntFrom(100u, &alloc.base); // duplicate of k1 by value
MapInsertR(&counts, k1, 1u); MapInsertR(&counts, k2, 2u);
Int probe = IntFrom(100u, &alloc.base);
u64 *got = MapGetFirstPtr(&counts, probe);
Int missing = IntFrom(999u, &alloc.base); Int probe = IntFrom(100u, &alloc.base);
u64 *got = MapGetFirstPtr(&counts, probe);
Int missing = IntFrom(999u, &alloc.base);
u64 *gone = MapGetFirstPtr(&counts, missing);- In
Int.Math.c:67:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(3, &alloc.base);
IntShiftLeft(&value, 4);- In
Int.Math.c:101:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(255, &alloc.base);
Int b = IntFrom(1, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:102:
Int a = IntFrom(255, &alloc.base);
Int b = IntFrom(1, &alloc.base);
Int result_value = IntInit(&alloc.base);
Str text = StrInit(&alloc.base);- In
Int.Math.c:125:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(40, &alloc.base);
Int rhs = IntFrom(2, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:126:
Int base = IntFrom(40, &alloc.base);
Int rhs = IntFrom(2, &alloc.base);
Int result_value = IntInit(&alloc.base);
Int huge = IntFromStr("123456789012345678901234567890", &alloc.base);- In
Int.Math.c:158:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(256, &alloc.base);
Int b = IntFrom(1, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:159:
Int a = IntFrom(256, &alloc.base);
Int b = IntFrom(1, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:177:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(40, &alloc.base);
Int rhs = IntFrom(2, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:178:
Int base = IntFrom(40, &alloc.base);
Int rhs = IntFrom(2, &alloc.base);
Int result_value = IntInit(&alloc.base);
Int preserved = IntFrom(99, &alloc.base);- In
Int.Math.c:180:
Int rhs = IntFrom(2, &alloc.base);
Int result_value = IntInit(&alloc.base);
Int preserved = IntFrom(99, &alloc.base);
Int huge = IntFromStr("12345678901234567890", &alloc.base);
Str text = StrInit(&alloc.base);- In
Int.Math.c:215:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(3, &alloc.base);
Int b = IntFrom(5, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:216:
Int a = IntFrom(3, &alloc.base);
Int b = IntFrom(5, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:217:
Int a = IntFrom(3, &alloc.base);
Int b = IntFrom(5, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntSub(&result_value, &a, &b);- In
Int.Math.c:234:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(21, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:235:
Int a = IntFrom(21, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:275:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(0, &alloc.base);
Int b = IntFrom(12345, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:276:
Int a = IntFrom(0, &alloc.base);
Int b = IntFrom(12345, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:296:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(12345, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:314:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(7, &alloc.base);
Int exponent = IntFrom(20, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:315:
Int base = IntFrom(7, &alloc.base);
Int exponent = IntFrom(20, &alloc.base);
Int result_value = IntInit(&alloc.base);
Str text = StrInit(&alloc.base);- In
Int.Math.c:365:
DefaultAllocator alloc = DefaultAllocatorInit();
Int dividend = IntFrom(126, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:403:
DefaultAllocator alloc = DefaultAllocatorInit();
Int dividend = IntFrom(10, &alloc.base);
Int divisor = IntFrom(3, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:404:
Int dividend = IntFrom(10, &alloc.base);
Int divisor = IntFrom(3, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:405:
Int dividend = IntFrom(10, &alloc.base);
Int divisor = IntFrom(3, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntDivExact(&result_value, ÷nd, &divisor);- In
Int.Math.c:446:
DefaultAllocator alloc = DefaultAllocatorInit();
Int dividend = IntFrom(126, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:481:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(48, &alloc.base);
Int b = IntFrom(18, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:482:
Int a = IntFrom(48, &alloc.base);
Int b = IntFrom(18, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:501:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(21, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:502:
Int a = IntFrom(21, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:521:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(4096, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:539:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(200, &alloc.base);
Int root = IntInit(&alloc.base);
Int remainder = IntInit(&alloc.base);- In
Int.Math.c:560:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(200, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:578:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(200, &alloc.base);
Int root = IntInit(&alloc.base);
Int remainder = IntInit(&alloc.base);- In
Int.Math.c:599:
DefaultAllocator alloc = DefaultAllocatorInit();
Int square = IntFrom(144, &alloc.base);
Int non_square = IntFrom(145, &alloc.base);- In
Int.Math.c:600:
Int square = IntFrom(144, &alloc.base);
Int non_square = IntFrom(145, &alloc.base);
bool result = IntIsPerfectSquare(&square);- In
Int.Math.c:616:
DefaultAllocator alloc = DefaultAllocatorInit();
Int power = IntFrom(81, &alloc.base);
Int non_power = IntFrom(82, &alloc.base);
Int one = IntFrom(1, &alloc.base);- In
Int.Math.c:617:
Int power = IntFrom(81, &alloc.base);
Int non_power = IntFrom(82, &alloc.base);
Int one = IntFrom(1, &alloc.base);- In
Int.Math.c:618:
Int power = IntFrom(81, &alloc.base);
Int non_power = IntFrom(82, &alloc.base);
Int one = IntFrom(1, &alloc.base);
bool result = IntIsPerfectPower(&power);- In
Int.Math.c:636:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(5, &alloc.base);
Int p = IntFrom(7, &alloc.base);
Int b = IntFrom(9, &alloc.base);- In
Int.Math.c:637:
Int a = IntFrom(5, &alloc.base);
Int p = IntFrom(7, &alloc.base);
Int b = IntFrom(9, &alloc.base);
Int n = IntFrom(21, &alloc.base);- In
Int.Math.c:638:
Int a = IntFrom(5, &alloc.base);
Int p = IntFrom(7, &alloc.base);
Int b = IntFrom(9, &alloc.base);
Int n = IntFrom(21, &alloc.base);- In
Int.Math.c:639:
Int p = IntFrom(7, &alloc.base);
Int b = IntFrom(9, &alloc.base);
Int n = IntFrom(21, &alloc.base);
bool result = IntJacobi(&a, &p) == -1;- In
Int.Math.c:657:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(12345, &alloc.base);
Int mod = IntFrom(97, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:658:
Int value = IntFrom(12345, &alloc.base);
Int mod = IntFrom(97, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:677:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(100, &alloc.base);
Int b = IntFrom(250, &alloc.base);
Int m = IntFrom(13, &alloc.base);- In
Int.Math.c:678:
Int a = IntFrom(100, &alloc.base);
Int b = IntFrom(250, &alloc.base);
Int m = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:679:
Int a = IntFrom(100, &alloc.base);
Int b = IntFrom(250, &alloc.base);
Int m = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:699:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(5, &alloc.base);
Int b = IntFrom(9, &alloc.base);
Int m = IntFrom(13, &alloc.base);- In
Int.Math.c:700:
Int a = IntFrom(5, &alloc.base);
Int b = IntFrom(9, &alloc.base);
Int m = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:701:
Int a = IntFrom(5, &alloc.base);
Int b = IntFrom(9, &alloc.base);
Int m = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:721:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(123, &alloc.base);
Int b = IntFrom(456, &alloc.base);
Int m = IntFrom(97, &alloc.base);- In
Int.Math.c:722:
Int a = IntFrom(123, &alloc.base);
Int b = IntFrom(456, &alloc.base);
Int m = IntFrom(97, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:723:
Int a = IntFrom(123, &alloc.base);
Int b = IntFrom(456, &alloc.base);
Int m = IntFrom(97, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:743:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(10, &alloc.base);
Int b = IntFrom(3, &alloc.base);
Int m = IntFrom(13, &alloc.base);- In
Int.Math.c:744:
Int a = IntFrom(10, &alloc.base);
Int b = IntFrom(3, &alloc.base);
Int m = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:745:
Int a = IntFrom(10, &alloc.base);
Int b = IntFrom(3, &alloc.base);
Int m = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);
Int check = IntInit(&alloc.base);- In
Int.Math.c:769:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(7, &alloc.base);
Int mod = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:770:
Int base = IntFrom(7, &alloc.base);
Int mod = IntFrom(13, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:789:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(4, &alloc.base);
Int exp = IntFrom(13, &alloc.base);
Int mod = IntFrom(497, &alloc.base);- In
Int.Math.c:790:
Int base = IntFrom(4, &alloc.base);
Int exp = IntFrom(13, &alloc.base);
Int mod = IntFrom(497, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:791:
Int base = IntFrom(4, &alloc.base);
Int exp = IntFrom(13, &alloc.base);
Int mod = IntFrom(497, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:811:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(3, &alloc.base);
Int mod = IntFrom(11, &alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:812:
Int value = IntFrom(3, &alloc.base);
Int mod = IntFrom(11, &alloc.base);
Int result_value = IntInit(&alloc.base);
Int check = IntInit(&alloc.base);- In
Int.Math.c:835:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(10, &alloc.base);
Int mod = IntFrom(13, &alloc.base);
Int root = IntInit(&alloc.base);- In
Int.Math.c:836:
Int value = IntFrom(10, &alloc.base);
Int mod = IntFrom(13, &alloc.base);
Int root = IntInit(&alloc.base);
Int check = IntInit(&alloc.base);- In
Int.Math.c:857:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(3, &alloc.base);
Int mod = IntFrom(7, &alloc.base);
Int root = IntFrom(99, &alloc.base);- In
Int.Math.c:858:
Int value = IntFrom(3, &alloc.base);
Int mod = IntFrom(7, &alloc.base);
Int root = IntFrom(99, &alloc.base);- In
Int.Math.c:859:
Int value = IntFrom(3, &alloc.base);
Int mod = IntFrom(7, &alloc.base);
Int root = IntFrom(99, &alloc.base);
bool result = !IntModSqrt(&root, &value, &mod);- In
Int.Math.c:877:
Int prime = IntFromStr("1000000007", &alloc.base);
Int composite = IntFrom(561, &alloc.base);
bool result = IntIsProbablePrime(&prime);- In
Int.Math.c:914:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(6, &alloc.base);
Int mod = IntFrom(15, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:915:
Int value = IntFrom(6, &alloc.base);
Int mod = IntFrom(15, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:916:
Int value = IntFrom(6, &alloc.base);
Int mod = IntFrom(15, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntModInv(&result_value, &value, &mod);- In
Int.Math.c:933:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(1, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int m = IntFrom(15, &alloc.base);- In
Int.Math.c:934:
Int a = IntFrom(1, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int m = IntFrom(15, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:935:
Int a = IntFrom(1, &alloc.base);
Int b = IntFrom(6, &alloc.base);
Int m = IntFrom(15, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:936:
Int b = IntFrom(6, &alloc.base);
Int m = IntFrom(15, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntModDiv(&result_value, &a, &b, &m);- In
Int.Math.c:954:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(1, &alloc.base);
Int b = IntFrom(2, &alloc.base);- In
Int.Math.c:955:
Int a = IntFrom(1, &alloc.base);
Int b = IntFrom(2, &alloc.base);
IntAdd(NULL, &a, &b);- In
Int.Math.c:977:
DefaultAllocator alloc = DefaultAllocatorInit();
Int dividend = IntFrom(1, &alloc.base);
Int divisor = IntInit(&alloc.base);
Int quotient = IntFrom(99, &alloc.base);- In
Int.Math.c:979:
Int dividend = IntFrom(1, &alloc.base);
Int divisor = IntInit(&alloc.base);
Int quotient = IntFrom(99, &alloc.base);
Int remainder = IntFrom(77, &alloc.base);- In
Int.Math.c:980:
Int divisor = IntInit(&alloc.base);
Int quotient = IntFrom(99, &alloc.base);
Int remainder = IntFrom(77, &alloc.base);
bool result = !IntDivMod("ient, &remainder, ÷nd, &divisor);- In
Int.Math.c:1000:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(16, &alloc.base);
Int root = IntFrom(99, &alloc.base);
Int remainder = IntFrom(77, &alloc.base);- In
Int.Math.c:1001:
Int value = IntFrom(16, &alloc.base);
Int root = IntFrom(99, &alloc.base);
Int remainder = IntFrom(77, &alloc.base);
bool result = !IntRootRem(&root, &remainder, &value, 0);- In
Int.Math.c:1002:
Int value = IntFrom(16, &alloc.base);
Int root = IntFrom(99, &alloc.base);
Int remainder = IntFrom(77, &alloc.base);
bool result = !IntRootRem(&root, &remainder, &value, 0);- In
Int.Math.c:1020:
DefaultAllocator alloc = DefaultAllocatorInit();
Int dividend = IntFrom(10, &alloc.base);
Int quotient = IntFrom(99, &alloc.base);- In
Int.Math.c:1021:
Int dividend = IntFrom(10, &alloc.base);
Int quotient = IntFrom(99, &alloc.base);
IntDiv("ient, ÷nd, 0u);- In
Int.Math.c:1037:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFrom(10, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:1038:
Int value = IntFrom(10, &alloc.base);
Int result_value = IntFrom(99, &alloc.base);
IntMod(&result_value, &value, 0u);- In
Int.Math.c:1054:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(10, &alloc.base);
Int b = IntFrom(3, &alloc.base);
Int m = IntInit(&alloc.base);- In
Int.Math.c:1055:
Int a = IntFrom(10, &alloc.base);
Int b = IntFrom(3, &alloc.base);
Int m = IntInit(&alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:1057:
Int b = IntFrom(3, &alloc.base);
Int m = IntInit(&alloc.base);
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntModDiv(&result_value, &a, &b, &m);- In
Int.Math.c:1075:
DefaultAllocator alloc = DefaultAllocatorInit();
Int a = IntFrom(3, &alloc.base);
Int n = IntFrom(8, &alloc.base);
int symbol = 99;- In
Int.Math.c:1076:
Int a = IntFrom(3, &alloc.base);
Int n = IntFrom(8, &alloc.base);
int symbol = 99;
bool error = false;- In
Int.Math.c:1096:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(2, &alloc.base);
Int mod = IntInit(&alloc.base);
Int result_value = IntInit(&alloc.base);- In
Int.Math.c:1110:
DefaultAllocator alloc = DefaultAllocatorInit();
Int base = IntFrom(2, &alloc.base);
Int exp = IntFrom(8, &alloc.base);
Int mod = IntInit(&alloc.base);- In
Int.Math.c:1111:
Int base = IntFrom(2, &alloc.base);
Int exp = IntFrom(8, &alloc.base);
Int mod = IntInit(&alloc.base);
Int result_value = IntFrom(99, &alloc.base);- In
Int.Math.c:1113:
Int exp = IntFrom(8, &alloc.base);
Int mod = IntInit(&alloc.base);
Int result_value = IntFrom(99, &alloc.base);
bool result = !IntPowMod(&result_value, &base, &exp, &mod);
Last updated on