// JABigInt32_OC_IOS_Undocumented_Header.txt // JABigInt32 // // This file is published under the Creative Commons Attribution 3.0 License. // www.JasonAndrade.ca // // This is the undocumented version of the JABigInt32_OC_IOS.h header file. // The purpose of this file is to convey the API of the JABigInt32 library written in Objective-C for the IOS platform. // While this version of the file has been published under the Creative Commons Attribution 3.0 License, the documented version included with the commercial software library is protected by copyright law. // The documented version of this file contains detailed descriptions of every method/function and how they are to be correctly utilized. // Enable ARM NEON if support is available #ifdef __ARM_NEON__ #define JA_BIG_INT_32_ARM_NEON_ENABLED TRUE #endif // Done enabling ARM NEON if support is available // Import header if ARM NEON is enabled #ifdef JA_BIG_INT_32_ARM_NEON_ENABLED #import #endif // Done importing header if ARM NEON is enabled #define JA_BIG_INT_32_MAXIMUM_BIT_SIZE 2097120U #import #import "JAErrorTree_OC_IOS.h" #import #import #import @interface JABigInt32:NSObject @end @interface JABigInt32() { @protected unsigned short _capacity; unsigned int *_dataPtr; bool _isNegative; unsigned short _size; } +(bool) getIsARMNEONEnabled; +(unsigned int) getUnsignedIntBitSize:(unsigned int)anUnsignedInt; +(unsigned int) getUnsignedLongLongBitSize:(unsigned long long)anUnsignedLongLong; +(JABigInt32 *) newJABigInt32WithCapacity:(const unsigned short)initialCapacity; +(JABigInt32 *) newJABigInt32WithSignedDecimalString:(char *)initialSignedDecimalStringPtr signedDecimalStringLength:(const int)initialSignedDecimalStringLength capacity:(const unsigned short)initialCapacity parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; +(JABigInt32 *) newJABigInt32WithUnsignedDecimalString:(char *)initialUnsignedDecimalStringPtr unsignedDecimalStringLength:(const int)initialUnsignedDecimalStringLength isNegative:(const bool)initialIsNegative capacity:(const unsigned short)initialCapacity parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; +(JABigInt32 *) newJABigInt32WithUnsignedHexadecimalString:(char *)initialUnsignedHexadecimalStringPtr unsignedHexadecimalStringLength:(const int)initialUnsignedHexadecimalStringLength isNegative:(const bool)initialIsNegative capacity:(const unsigned short)initialCapacity parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; +(JABigInt32 *) newJABigInt32WithInt:(const int)initialInt capacity:(const unsigned short)initialCapacity; +(JABigInt32 *) newJABigInt32WithLongLong:(const long long)initialLongLong capacity:(const unsigned short)initialCapacity; +(JABigInt32 *) newJABigInt32WithUnsignedInt:(const unsigned int)initialUnsignedInt isNegative:(const bool)initialIsNegative capacity:(const unsigned short)initialCapacity; +(JABigInt32 *) newJABigInt32WithUnsignedIntArray:(unsigned int *)initialUnsignedIntArrayPtr unsignedIntArraySize:(const unsigned short)initialUnsignedIntArraySize isNegative:(const bool)initialIsNegative capacity:(const unsigned short)initialCapacity parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; +(JABigInt32 *) newJABigInt32WithUnsignedLongLong:(const unsigned long long)initialUnsignedLongLong isNegative:(const bool)initialIsNegative capacity:(const unsigned short)initialCapacity; +(bool) tripleCheckAndCorrectFirstJABigInt32:(JABigInt32 **)firstJABigInt32ObjectPtrAddr secondJABigInt32:(JABigInt32 **)secondJABigInt32ObjectPtrAddr thirdJABigInt32:(JABigInt32 **)thirdJABigInt32ObjectPtrAddr firstJAErrorTree:(JAErrorTree **)firstJAErrorTreeObjectPtrAddr secondJAErrorTree:(JAErrorTree **)secondJAErrorTreeObjectPtrAddr thirdJAErrorTree:(JAErrorTree **)thirdJAErrorTreeObjectPtrAddr; +(bool) validateJABigInt32:(JABigInt32 *)aJABigInt32ObjectPtr; -(void) addInt:(const int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) additiveInverse; -(void) addJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) addLongLong:(const long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) addUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) addUnsignedLongLong:(const unsigned long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) bitwiseANDJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) bitwiseANDUnsignedInt:(const unsigned int)operand; -(void) bitwiseANDUnsignedLongLong:(const unsigned long long)operand; -(void) bitwiseLeftShiftUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) bitwiseNOT; -(void) bitwiseORJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) bitwiseORUnsignedInt:(const unsigned int)operand; -(void) bitwiseORUnsignedLongLong:(const unsigned long long)operand; -(void) bitwiseRightShiftUnsignedInt:(const unsigned int)operand; -(void) bitwiseTruncateByKeepingLeastSignificantBits:(unsigned int)maximumBitSize; -(void) bitwiseTruncateByKeepingMostSignificantBits:(unsigned int)maximumBitSize; -(void) bitwiseXORJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) bitwiseXORUnsignedInt:(const unsigned int)operand; -(void) bitwiseXORUnsignedLongLong:(const unsigned long long)operand; -(bool) compareEqualInt:(const int)operand; -(bool) compareEqualJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(bool) compareEqualLongLong:(const long long)operand; -(bool) compareEqualUnsignedInt:(const unsigned int)operand; -(bool) compareEqualUnsignedLongLong:(const unsigned long long)operand; -(bool) compareGTEInt:(const int)operand; -(bool) compareGTEJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(bool) compareGTELongLong:(const long long)operand; -(bool) compareGTEUnsignedInt:(const unsigned int)operand; -(bool) compareGTEUnsignedLongLong:(const unsigned long long)operand; -(bool) compareGTInt:(const int)operand; -(bool) compareGTJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(bool) compareGTLongLong:(const long long)operand; -(bool) compareGTUnsignedInt:(const unsigned int)operand; -(bool) compareGTUnsignedLongLong:(const unsigned long long)operand; -(bool) compareLTEInt:(const int)operand; -(bool) compareLTEJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(bool) compareLTELongLong:(const long long)operand; -(bool) compareLTEUnsignedInt:(const unsigned int)operand; -(bool) compareLTEUnsignedLongLong:(const unsigned long long)operand; -(bool) compareLTInt:(const int)operand; -(bool) compareLTJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(bool) compareLTLongLong:(const long long)operand; -(bool) compareLTUnsignedInt:(const unsigned int)operand; -(bool) compareLTUnsignedLongLong:(const unsigned long long)operand; -(char) compareWithInt:(const int)operand; -(char) compareWithJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(char) compareWithLongLong:(const long long)operand; -(char) compareWithUnsignedInt:(const unsigned int)operand; -(char) compareWithUnsignedLongLong:(const unsigned long long)operand; -(void) decrementWithParentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) divideInt:(const int)divisor remainder:(int *)remainderPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) divideJABigInt32:(JABigInt32 *)divisorObjectPtr remainder:(JABigInt32 *)remainderObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) divideLongLong:(const long long)divisor remainder:(long long *)remainderPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) divideUnsignedInt:(const unsigned int)divisor remainder:(long long *)remainderPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) divideUnsignedLongLong:(const unsigned long long)divisor remainder:(JABigInt32 *)remainderObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) exponentiateJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) exponentiateUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) factorialWithParentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(JABigInt32 *) generateJABigInt32UsingLeastSignificantBits:(const unsigned int)maximumBitSize capacity:(unsigned short)minimumCapacity; -(JABigInt32 *) generateJABigInt32UsingMostSignificantBits:(const unsigned int)maximumBitSize capacity:(unsigned short)minimumCapacity; -(unsigned int) getBitSize; -(unsigned short) getCapacity; -(unsigned int *) getData; -(int) getInt; -(bool) getIsEven; -(bool) getIsNegative; -(bool) getIsOdd; -(long long) getLongLong; -(unsigned short) getSize; -(unsigned int) getUnsignedInt; -(unsigned long long) getUnsignedLongLong; -(void) greatestCommonDivisorInt:(const int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) greatestCommonDivisorJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) greatestCommonDivisorLongLong:(const long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) greatestCommonDivisorUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) greatestCommonDivisorUnsignedLongLong:(const unsigned long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) incrementWithParentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) leastCommonMultipleInt:(const int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) leastCommonMultipleJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) leastCommonMultipleLongLong:(const long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) leastCommonMultipleUnsignedInt:(unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) leastCommonMultipleUnsignedLongLong:(unsigned long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) logarithmWithBaseJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) logarithmWithBaseUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) logarithmWithBaseUnsignedLongLong:(const unsigned long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) minimizeCapacity; -(void) multiplyInt:(const int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) multiplyJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) multiplyLongLong:(const long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) multiplyUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) multiplyUnsignedLongLong:(const unsigned long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(JABigInt32 *) newCopy; -(bool) printAsDecimalToOutputString:(char *)outputStringPtr outputStringOffset:(const int)outputStringOffset outputMaxLen:(const int)outputMaxLen outputLen:(int *)outputLenPtr minimumOutputDigits:(const int)minimumOutputDigits rightJustifyOutput:(const bool)rightJustifyOutput outputPaddingEnabled:(const bool)outputPaddingEnabled paddingCharacter:(const char)paddingCharacter prefixString:(char *)prefixStringPtr prefixStringLen:(const short)prefixStringLen prefixStringAndNegativeSignBeforePadding:(const bool)prefixStringAndNegativeSignBeforePadding suffixString:(char *)suffixStringPtr suffixStringLen:(const short)suffixStringLen suffixStringAfterPadding:(const bool)suffixStringAfterPadding separatorEnabled:(const bool)separatorEnabled separatorCharacter:(const char)separatorCharacter parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(bool) printAsHexadecimalToOutputString:(char *)outputStringPtr outputStringOffset:(const int)outputStringOffset outputMaxLen:(const int)outputMaxLen outputLen:(int *)outputLenPtr minimumHexadecimalOutputBytes:(const int)minimumHexadecimalOutputBytes rightJustifyOutput:(const bool)rightJustifyOutput outputPaddingEnabled:(const bool)outputPaddingEnabled paddingCharacter:(const char)paddingCharacter prefixString:(char *)prefixStringPtr prefixStringLen:(const short)prefixStringLen prefixStringAndNegativeSignBeforePadding:(const bool)prefixStringAndNegativeSignBeforePadding suffixString:(char *)suffixStringPtr suffixStringLen:(const short)suffixStringLen suffixStringAfterPadding:(const bool)suffixStringAfterPadding separatorEnabled:(const bool)separatorEnabled separatorCharacter:(const char)separatorCharacter parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) reinitializeWithInt:(const int)operand; -(void) reinitializeWithJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) reinitializeWithLongLong:(const long long)operand; -(void) reinitializeWithSignedDecimalString:(char *)newSignedDecimalStringPtr signedDecimalStringLength:(const int)newSignedDecimalStringLength parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) reinitializeWithUnsignedDecimalString:(char *)newUnsignedDecimalStringPtr unsignedDecimalStringLength:(const int)newUnsignedDecimalStringLength isNegative:(const bool)newIsNegative parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) reinitializeWithUnsignedHexadecimalString:(char *)newUnsignedHexadecimalStringPtr unsignedHexadecimalStringLength:(const int)newUnsignedHexadecimalStringLength isNegative:(const bool)newIsNegative parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) reinitializeWithUnsignedInt:(const unsigned int)operand isNegative:(const bool)newIsNegative; -(void) reinitializeWithUnsignedIntArray:(unsigned int *)newUnsignedIntArrayPtr unsignedIntArraySize:(const unsigned short)newUnsignedIntArraySize isNegative:(const bool)newIsNegative parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) reinitializeWithUnsignedLongLong:(const unsigned long long)operand isNegative:(const bool)newIsNegative; -(void) rootWithIndexJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) rootWithIndexUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) setCapacity:(unsigned short)newCapacity; -(void) setIsNegative:(const bool)newIsNegative; -(void) subtractInt:(const int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) subtractJABigInt32:(JABigInt32 *)operandObjectPtr parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) subtractLongLong:(const long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) subtractUnsignedInt:(const unsigned int)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) subtractUnsignedLongLong:(const unsigned long long)operand parentJAErrorTreeNode:(JAErrorTree *)parentJAErrorTreeNodeObjectPtr; -(void) truncateByKeepingLeastSignificantSegments:(unsigned short)maximumSize; -(void) truncateByKeepingMostSignificantSegments:(unsigned short)maximumSize; @end