35 typedef struct OSBigInt {
87 (
OSCTXT* pctxt, OSBigInt* pInt,
const char* value,
int radix);
103 (
OSCTXT* pctxt, OSBigInt* pInt,
const char* value, OSSIZE len,
int radix);
126 (
OSCTXT* pctxt, OSBigInt* pInt, OSUINT64 value);
139 (
OSCTXT* pctxt, OSBigInt* pInt, OSOCTET* value, OSSIZE vallen);
141 #define rtxBigIntSetBytes rtxBigIntSetBytesSigned 154 (
OSCTXT* pctxt, OSBigInt* pInt, OSOCTET* value, OSSIZE vallen);
177 (
OSCTXT* pctxt,
const OSBigInt* pInt, OSOCTET* buffer, OSSIZE bufSize);
199 (
OSCTXT* pctxt,
const OSBigInt* pSrc, OSBigInt* pDst);
213 (
OSCTXT* pctxt,
const OSBigInt* pSrc, OSBigInt* pDst);
237 (
OSCTXT* pctxt,
const OSBigInt* pInt,
int radix,
char* str, OSSIZE strSize);
251 (
OSCTXT* pctxt,
const OSBigInt* pInt,
int radix);
262 (
const OSUTF8CHAR* name,
const OSBigInt* bigint,
int radix);
288 (
OSCTXT* pctxt,
const char* arg1,
const char* arg2);
312 OSBigInt* result,
const OSBigInt* arg1,
const OSBigInt* arg2);
325 OSBigInt* result,
const OSBigInt* arg1,
const OSBigInt* arg2);
338 OSBigInt* result,
const OSBigInt* arg1,
const OSBigInt* arg2);
366 EXTERNRT
short rtxBigIntByteRadix (
int halfRadix);
EXTERNRT int rtxBigIntAdd(OSCTXT *pctxt, OSBigInt *result, const OSBigInt *arg1, const OSBigInt *arg2)
This function is used to add two big integer values.
EXTERN OSSIZE rtxRadixDigitsToBase2(OSUINT8 radix, OSSIZE n)
Return the number of base 2 digits that may be required to represent an integer having n radix digits...
EXTERNRT int rtxBigIntToString(OSCTXT *pctxt, const OSBigInt *pInt, int radix, char *str, OSSIZE strSize)
This function is used to convert a binary big integer value to a string.
EXTERNRT int rtxBigIntMultiply(OSCTXT *pctxt, OSBigInt *result, const OSBigInt *arg1, const OSBigInt *arg2)
This function is used to multiply two big integer values.
EXTERNRT char * rtxBigIntToDynStr(OSCTXT *pctxt, const OSBigInt *pInt, int radix)
This function is used to convert a binary big integer value to a dynamic string.
EXTERNRT OSSIZE rtxBigIntGetDataLen(const OSBigInt *pInt)
This function is used to get the size in bytes of the binary big integer data value.
EXTERNRT void rtxBigIntInit(OSBigInt *pInt)
This function initializes a big integer structure.
EXTERNRT int rtxBigIntSetUInt64(OSCTXT *pctxt, OSBigInt *pInt, OSUINT64 value)
This function sets a big integer binary value from an unsigned 64-bit integer value.
EXTERNRT int rtxBigIntSetBytesUnsigned(OSCTXT *pctxt, OSBigInt *pInt, OSOCTET *value, OSSIZE vallen)
This function sets a big integer binary value from a byte array.
EXTERNRT int rtxBigIntCopy(OSCTXT *pctxt, const OSBigInt *pSrc, OSBigInt *pDst)
This function is used to copy a big integer data value from one structure to another.
EXTERNRT OSSIZE rtxBigIntDigitsNum(const OSBigInt *pInt, int radix)
This function is used to get the number of digits in the binary big integer data value based on radix...
Common run-time context definitions.
EXTERNRT int rtxBigIntSetBytesSigned(OSCTXT *pctxt, OSBigInt *pInt, OSOCTET *value, OSSIZE vallen)
This function sets a big integer binary value from a byte array.
EXTERNRT int rtxBigIntPrint(const OSUTF8CHAR *name, const OSBigInt *bigint, int radix)
This function is used to print a big integer value to standard output.
EXTERNRT int rtxBigIntStrCompare(OSCTXT *pctxt, const char *arg1, const char *arg2)
This function is used to compare two big integer numeric strings.
EXTERNRT unsigned short rtxBigIntBitsPerDigit(int halfRadix)
For internal use only.
EXTERNRT int rtxBigIntCompare(const OSBigInt *arg1, const OSBigInt *arg2)
This function is used to compare two big integer values.
EXTERNRT int rtxBigIntSetStr(OSCTXT *pctxt, OSBigInt *pInt, const char *value, int radix)
This function sets a big integer binary value from a null-terminated string.
EXTERNRT void rtxBigIntFree(OSCTXT *pctxt, OSBigInt *pInt)
This function frees internal memory within the big integer structure.
EXTERNRT int rtxBigIntSetInt64(OSCTXT *pctxt, OSBigInt *pInt, OSINT64 value)
This function sets a big integer binary value from a signed 64-bit integer value. ...
EXTERNRT int rtxBigIntSubtract(OSCTXT *pctxt, OSBigInt *result, const OSBigInt *arg1, const OSBigInt *arg2)
This function is used to subtract one big integer value from another.
EXTERNRT int rtxBigIntGetData(OSCTXT *pctxt, const OSBigInt *pInt, OSOCTET *buffer, OSSIZE bufSize)
This function is used to get the binary big integer data value in a byte array.
Run-time context structure.
EXTERNRT int rtxBigIntSetStrn(OSCTXT *pctxt, OSBigInt *pInt, const char *value, OSSIZE len, int radix)
This function sets a big integer binary value from a character string using the given number of chara...
EXTERNRT OSBOOL rtxBigIntToReal(const OSBigInt *pSrc, OSREAL *pvalue)
This function converts the given big integer to a real, if it will fit without requiring rounding (i...
EXTERNRT int rtxBigIntFastCopy(OSCTXT *pctxt, const OSBigInt *pSrc, OSBigInt *pDst)
This function is used to copy one BigInt to another.
EXTERNRT int rtxBigIntEnsureCapacity(OSCTXT *pctxt, OSBigInt *pInt, OSSIZE capacity)
This function ensures that the big integer has capacity to hold at least the given number of bytes...
EXTERN OSSIZE rtxBase2DigitsToRadix(OSUINT8 radix, OSSIZE n)
Return the number of radix digits that may be required to represent an integer having n base 2 digits...