44 #ifndef Included_RexxNumberString
45 #define Included_RexxNumberString
61 #define NumFormScientific 0x00000001
63 #define NumberRounded 0x00000010
66 #define OVERFLOWSPACE 2
68 #define SetNumberStringZero() \
69 this->number[0] = '\0'; \
75 #define NumberStringRound(s,d) s->roundUp(s,d)
95 void *
operator new(size_t, size_t);
96 inline void *
operator new(
size_t size,
void *ptr) {
return ptr;}
97 inline void operator delete(
void *) { ; }
98 inline void operator delete(
void *, size_t) { }
99 inline void operator delete(
void *,
void *) { }
170 if (this->
length > digits)
235 int format(
const char *,
size_t);
263 static char *
subtractDivisor(
char *data1,
size_t length1,
char *data2,
size_t length2,
char *result,
int Mult);
RexxNumberString * new_numberstring(const char *s, stringsize_t l)
RexxNumberString * new_numberstringFromWholenumber(wholenumber_t n)
RexxNumberString * new_numberstringFromUint64(uint64_t n)
RexxNumberString * new_numberstringFromDouble(double n)
RexxNumberString * new_numberstringFromInt64(int64_t n)
void AdjustPrecision(RexxNumberString *, char *, int)
RexxNumberString * new_numberstringFromStringsize(stringsize_t n)
#define NumFormScientific
RexxNumberString * new_numberstringFromFloat(float n)
RexxObject *(RexxObject::* PCPPM)()
ssize_t integer(RexxObject *obj, const char *errorMessage)
static const bool FORM_SCIENTIFIC
char * stripLeadingZeros(char *)
char * adjustNumber(char *, char *, size_t, size_t)
RexxString * stringObject
void formatUnsignedInt64(uint64_t integer)
RexxInteger * strictGreaterThan(RexxObject *)
static char * addToBaseTen(int, char *, char *)
wholenumber_t comp(RexxObject *, RexxString *alternativeOperator=OREF_NULL, RexxInteger **alternativeOperatorResultPtr=NULL)
static RexxNumberString * newInstanceFromFloat(float)
RexxObject * xorOp(RexxObject *)
RexxNumberString * checkNumber(size_t digits)
RexxInteger * isLessThan(RexxObject *)
void formatUnsignedNumber(size_t)
RexxInteger * strictEqual(RexxObject *)
void flatten(RexxEnvelope *)
static char * dividePower(char *AccumPtr, RexxNumberStringBase *Accum, char *Output, size_t NumberDigits)
RexxObject * truncInternal(size_t)
static RexxNumberString * newInstance(const char *, stringsize_t)
RexxNumberString * prepareNumber(size_t, bool)
static char * addMultiplier(char *, size_t, char *, int)
RexxInteger * strictLessThan(RexxObject *)
RexxInteger * isGreaterThan(RexxObject *)
bool createUnsignedInt64Value(const char *thisnum, stringsize_t intlength, int carry, wholenumber_t exponent, uint64_t maxValue, uint64_t &result)
static RexxNumberString * newInstanceFromDouble(double)
bool createUnsignedValue(const char *thisnum, stringsize_t intlength, int carry, wholenumber_t exponent, uwholenumber_t maxValue, uwholenumber_t &result)
RexxString * concatBlank(RexxObject *)
RexxString * makeString()
RexxNumberString * multiply(RexxObject *)
RexxObject * roundInternal()
RexxObject * getRealValue(RexxActivation *)
RexxNumberString * minus(RexxObject *)
RexxString * primitiveMakeString()
RexxNumberString * Max(RexxObject **, size_t, size_t)
void formatNumber(wholenumber_t)
RexxObject * floorInternal()
bool int64Value(int64_t *result, stringsize_t numDigits)
void liveGeneral(int reason)
bool unsignedNumberValue(uwholenumber_t &result, size_t precision)
static void createInstance()
static RexxNumberString * newInstanceFromUint64(uint64_t)
RexxString * stringValue()
RexxString * formatRexx(RexxObject *, RexxObject *, RexxObject *, RexxObject *)
RexxObject * ceilingInternal()
bool unsignedInt64Value(uint64_t *result, stringsize_t numDigits)
RexxInteger * hasMethod(RexxString *)
RexxObject * evaluate(RexxActivation *, RexxExpressionStack *)
RexxInteger * integerValue(size_t)
bool checkIntegerDigits(stringsize_t numDigits, stringsize_t &numberLength, wholenumber_t &numberExponent, bool &carry)
RexxClass * classObject()
static char * multiplyBaseSixteen(char *, char *)
wholenumber_t strictComp(RexxObject *)
static RexxClass * classInstance
RexxNumberString * Min(RexxObject **, size_t, size_t)
RexxString * d2xD2c(RexxObject *, bool)
RexxNumberString * numberString()
RexxNumberString * Division(RexxNumberString *, unsigned int)
void formatInt64(int64_t integer)
void setString(RexxString *)
static char * multiplyPower(char *leftPtr, RexxNumberStringBase *left, char *rightPtr, RexxNumberStringBase *right, char *OutPtr, size_t OutLen, size_t NumberDigits)
RexxNumberString * clone()
RexxString * d2c(RexxObject *)
RexxInteger * strictLessOrEqual(RexxObject *)
RexxMethod * instanceMethod(RexxString *)
RexxObject * andOp(RexxObject *)
RexxNumberString * integerDivide(RexxObject *)
static RexxNumberString * newInstanceFromStringsize(stringsize_t)
RexxString * concat(RexxObject *)
RexxObject * getValue(RexxActivation *context)
RexxNumberString(RESTORETYPE restoreType)
RexxObject * orOp(RexxObject *)
RexxNumberString * Multiply(RexxNumberString *)
RexxNumberString * maxMin(RexxObject **, size_t, size_t, unsigned int)
RexxObject * unknown(RexxString *, RexxArray *, RexxDirectory *)
bool numberValue(wholenumber_t &result, size_t precision)
RexxObject * trunc(RexxObject *)
RexxInteger * strictNotEqual(RexxObject *)
static PCPPM operatorMethods[]
bool isInstanceOf(RexxClass *)
RexxNumberString * power(RexxObject *)
RexxNumberString * remainder(RexxObject *)
RexxInteger * strictGreaterOrEqual(RexxObject *)
static char * subtractDivisor(char *data1, size_t length1, char *data2, size_t length2, char *result, int Mult)
virtual HashCode getHashValue()
RexxNumberString * prepareOperatorNumber(size_t, size_t, bool)
static RexxNumberString * newInstanceFromWholenumber(wholenumber_t)
RexxInteger * equal(RexxObject *)
RexxInteger * isGreaterOrEqual(RexxObject *)
RexxString * d2x(RexxObject *)
virtual wholenumber_t compareTo(RexxObject *)
bool isEqual(RexxObject *)
int format(const char *, size_t)
RexxInteger * isLessOrEqual(RexxObject *)
static void subtractNumbers(RexxNumberString *larger, const char *largerPtr, wholenumber_t aLargerExp, RexxNumberString *smaller, const char *smallerPtr, wholenumber_t aSmallerExp, RexxNumberString *result, char **resultPtr)
RexxObject * operatorNot(RexxObject *)
void setNumericSettings(size_t digits, bool form)
virtual bool logicalValue(logical_t &)
static size_t highBits(size_t)
static RexxNumberString * newInstanceFromInt64(int64_t)
static char * addToBaseSixteen(int, char *, char *)
RexxNumberString * plus(RexxObject *)
RexxNumberString * divide(RexxObject *)
RexxString * formatInternal(size_t, size_t, size_t, size_t, RexxNumberString *, size_t, bool)
RexxSupplier * instanceMethods(RexxClass *)
bool doubleValue(double &result)
static char * multiplyBaseTen(char *, char *)
RexxInteger * notEqual(RexxObject *)
RexxNumberString * addSub(RexxNumberString *, unsigned int, size_t)
unsigned __int64 uint64_t