Go to the source code of this file.
Classes | |
class | xlong |
Functions | |
void | XlongAdd (const xlong &, const xlong &, xlong &) |
64-bit signed addition | |
void | XlongSub (const xlong &, const xlong &, xlong &) |
64-bit signed subtraction | |
void | XMul64 (const xlong &, const xlong &, xlong &) |
Private to ccmath.h. Primitive for operator overloading. | |
void | XDiv64 (const xlong &, const xlong &, xlong &) |
void | XlongAsl64 (const xlong &input, INT32 shift, xlong &result) |
Private to ccmath.cpp. Primitive for operator overloading. | |
void | XlongAsr64 (const xlong &input, INT32 shift, xlong &result) |
Private to ccmath.cpp. Primitive for operator overloading. | |
void | XlongAddOne (const xlong &, xlong &) |
void | XlongSubOne (const xlong &, xlong &) |
void | XMul64One (const xlong &, xlong &) |
void | XDiv64One (const xlong &, xlong &) |
void | XlongNegOne (xlong &) |
64-bit signed negation | |
void | XlongAsl64One (INT32 shift, xlong &result) |
void | XlongAsr64One (INT32 shift, xlong &result) |
void | LongToXlong (const INT32, xlong &) |
INT32 | XlongToLong (const xlong &) |
double | XlongToDouble (const xlong &) |
Conversion between types. Private to ccmaths.h which has a better interface on top of this. | |
void | DoubleToXlong (const double, xlong &) |
Conversion between types. Private to ccmaths.h which has a better interface on top of this. | |
INT32 | XlongCmpGT (const xlong &first, const xlong &second) |
Private to ccmath.cpp. Primitive for operator overloading. | |
INT32 | XlongCmpGE (const xlong &first, const xlong &second) |
INT32 | XlongCmpLT (const xlong &first, const xlong &second) |
INT32 | XlongCmpLE (const xlong &first, const xlong &second) |
INT32 | XlongCmpEQ (const xlong &first, const xlong &second) |
INT32 | XlongCmpNE (const xlong &first, const xlong &second) |
void | XlongIncrement (xlong &) |
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Add with a 1 as a second parameter. | |
void | XlongDecrement (xlong &) |
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Sub with a 1 as a second parameter. | |
void | XMul32 (INT32, INT32, xlong &) |
To avoid losing precision. | |
void | XlongToAscii (const xlong &, LPSTR) |
Display xlongs in meaningful format. | |
void | XlongToUnicode (const xlong &, WCHAR *) |
void | XlongByFixed16One (xlong *, fixed16) |
Multiplying without losing precision. Private function used by operator overloading on *=. | |
INT32 | Mul32Div32 (INT32, INT32, INT32) |
To avoid losing precision. | |
xlong | Mul64Div32 (xlong, xlong, INT32) |
void | XMatrixCalc (fixed16, const xlong &, fixed16, const xlong &, xlong &) |
Matrix multiply primitive done using intermediate 128-bit results so full accuracy is maintained. Special cases are when fix1 or fix2 are 0.0 or 1.0 as multiplications may be avoided (NOT YET IMPLEMENTED) Note that the result is rounded to the nearest integer. | |
Variables | |
CCAPI | fixed16 |
An XLONG is a signed 64-bit value. Its purpose is to represent very large numbers. |
|
Conversion between types. Private to ccmaths.h which has a better interface on top of this.
Definition at line 2166 of file xlong.cpp. 02167 { 02168 x = (xlong)arg ; 02169 }
|
|
|
|
To avoid losing precision.
Definition at line 1775 of file xlong.cpp. 01776 { 01777 // return MulDiv(mul1,mul2,divisor) ; 01778 return INT32(((xlong)mul1*mul2)/divisor) ; 01779 }
|
|
|
|
|
|
|
|
64-bit signed addition
Definition at line 1698 of file xlong.cpp.
|
|
Definition at line 1703 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading.
Definition at line 1889 of file xlong.cpp.
|
|
Definition at line 1894 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading.
Definition at line 1917 of file xlong.cpp.
|
|
Definition at line 1922 of file xlong.cpp.
|
|
Multiplying without losing precision. Private function used by operator overloading on *=.
Definition at line 2123 of file xlong.cpp.
|
|
Definition at line 1970 of file xlong.cpp.
|
|
Definition at line 1955 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading. .. = comparison operator, one of: GT > GE >= LT < LE <= EQ == NE !=
Definition at line 1950 of file xlong.cpp.
|
|
Definition at line 1965 of file xlong.cpp.
|
|
Definition at line 1960 of file xlong.cpp.
|
|
Definition at line 1975 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Sub with a 1 as a second parameter.
Definition at line 2017 of file xlong.cpp.
|
|
Private to ccmath.cpp. Primitive for operator overloading. This is much more efficient than calling Add with a 1 as a second parameter.
Definition at line 1996 of file xlong.cpp.
|
|
64-bit signed negation
Definition at line 1754 of file xlong.cpp.
|
|
64-bit signed subtraction
Definition at line 1728 of file xlong.cpp.
|
|
Definition at line 1733 of file xlong.cpp.
|
|
Display xlongs in meaningful format.
Definition at line 2066 of file xlong.cpp. 02067 { 02068 #if defined(__WXMSW__) 02069 sprintf(dest,"%I64i",arg) ; 02070 #else 02071 sprintf(dest,"%lld",arg) ; 02072 #endif 02073 }
|
|
Conversion between types. Private to ccmaths.h which has a better interface on top of this.
Definition at line 2144 of file xlong.cpp.
|
|
|
|
Definition at line 2075 of file xlong.cpp. 02076 { 02077 #if defined(__WXMSW__) 02078 swprintf( dest, 21, L"%I64i", arg ); 02079 #else 02080 swprintf( dest, 21, L"%lld", arg ); 02081 #endif 02082 }
|
|
Matrix multiply primitive done using intermediate 128-bit results so full accuracy is maintained. Special cases are when fix1 or fix2 are 0.0 or 1.0 as multiplications may be avoided (NOT YET IMPLEMENTED) Note that the result is rounded to the nearest integer.
Definition at line 2102 of file xlong.cpp.
|
|
To avoid losing precision.
Definition at line 1796 of file xlong.cpp. 01797 { 01798 result = (xlong)mul1*mul2 ; 01799 }
|
|
Private to ccmath.h. Primitive for operator overloading.
Definition at line 1819 of file xlong.cpp.
|
|
|
|
An XLONG is a signed 64-bit value. Its purpose is to represent very large numbers.
|