mirror of
https://gitlab.com/rnger/amath
synced 2026-10-15 12:06:03 +00:00
209 lines
4.6 KiB
Plaintext
209 lines
4.6 KiB
Plaintext
.TH "tBigInt" 3 "Tue Jan 24 2017" "Version 1.6.2" "amath" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
tBigInt \-
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBtBigInt\fP & \fBoperator=\fP (const \fBtBigInt\fP &rhs)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBtU32\fP \fBGetLength\fP () const "
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBtU32\fP \fBGetBlock\fP (\fBtU32\fP idx) const "
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBSetZero\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBtB\fP \fBIsZero\fP () const "
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBSetU64\fP (\fBtU64\fP val)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBSetU32\fP (\fBtU32\fP val)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBtU32\fP \fBGetU32\fP () const "
|
|
.br
|
|
.in -1c
|
|
.SS "Public Attributes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBtU32\fP \fBm_length\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBtU32\fP \fBm_blocks\fP [\fBc_BigInt_MaxBlocks\fP]"
|
|
.br
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
Definition at line 70 of file dragon4\&.cpp\&.
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "\fBtU32\fP tBigInt::GetBlock (\fBtU32\fP idx) const\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 91 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_blocks\&.
|
|
.PP
|
|
Referenced by Dragon4()\&.
|
|
.PP
|
|
.nf
|
|
91 {
|
|
92 return m_blocks[idx];
|
|
93 }
|
|
.fi
|
|
.SS "\fBtU32\fP tBigInt::GetLength () const\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 88 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_length\&.
|
|
.PP
|
|
Referenced by Dragon4()\&.
|
|
.PP
|
|
.nf
|
|
88 {
|
|
89 return m_length;
|
|
90 }
|
|
.fi
|
|
.SS "\fBtU32\fP tBigInt::GetU32 () const\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 136 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_blocks, and m_length\&.
|
|
.PP
|
|
.nf
|
|
136 {
|
|
137 return (m_length == 0) ? 0 : m_blocks[0];
|
|
138 }
|
|
.fi
|
|
.SS "\fBtB\fP tBigInt::IsZero () const\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 99 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_length\&.
|
|
.PP
|
|
Referenced by Dragon4()\&.
|
|
.PP
|
|
.nf
|
|
99 {
|
|
100 return m_length == 0;
|
|
101 }
|
|
.fi
|
|
.SS "\fBtBigInt\fP& tBigInt::operator= (const \fBtBigInt\fP & rhs)\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 73 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_blocks, and m_length\&.
|
|
.PP
|
|
Referenced by BigInt_MultiplyPow10(), BigInt_Pow10(), and Dragon4()\&.
|
|
.PP
|
|
.nf
|
|
74 {
|
|
75 tU32 length = rhs\&.m_length;
|
|
76 tU32 * pLhsCur = m_blocks;
|
|
77 for (const tU32 *pRhsCur = rhs\&.m_blocks, *pRhsEnd = pRhsCur + length;
|
|
78 pRhsCur != pRhsEnd;
|
|
79 ++pLhsCur, ++pRhsCur)
|
|
80 {
|
|
81 *pLhsCur = *pRhsCur;
|
|
82 }
|
|
83 m_length = length;
|
|
84 return *this;
|
|
85 }
|
|
.fi
|
|
.SS "void tBigInt::SetU32 (\fBtU32\fP val)\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 123 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_blocks, and m_length\&.
|
|
.PP
|
|
Referenced by BigInt_Pow10(), and Dragon4()\&.
|
|
.PP
|
|
.nf
|
|
124 {
|
|
125 if (val != 0)
|
|
126 {
|
|
127 m_blocks[0] = val;
|
|
128 m_length = (val != 0);
|
|
129 }
|
|
130 else
|
|
131 {
|
|
132 m_length = 0;
|
|
133 }
|
|
134 }
|
|
.fi
|
|
.SS "void tBigInt::SetU64 (\fBtU64\fP val)\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 104 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_blocks, and m_length\&.
|
|
.PP
|
|
Referenced by Dragon4()\&.
|
|
.PP
|
|
.nf
|
|
105 {
|
|
106 if (val > 0xFFFFFFFF)
|
|
107 {
|
|
108 m_blocks[0] = val & 0xFFFFFFFF;
|
|
109 m_blocks[1] = (val >> 32) & 0xFFFFFFFF;
|
|
110 m_length = 2;
|
|
111 }
|
|
112 else if (val != 0)
|
|
113 {
|
|
114 m_blocks[0] = val & 0xFFFFFFFF;
|
|
115 m_length = 1;
|
|
116 }
|
|
117 else
|
|
118 {
|
|
119 m_length = 0;
|
|
120 }
|
|
121 }
|
|
.fi
|
|
.SS "void tBigInt::SetZero ()\fC [inline]\fP"
|
|
|
|
.PP
|
|
Definition at line 96 of file dragon4\&.cpp\&.
|
|
.PP
|
|
References m_length\&.
|
|
.PP
|
|
.nf
|
|
96 {
|
|
97 m_length = 0;
|
|
98 }
|
|
.fi
|
|
.SH "Member Data Documentation"
|
|
.PP
|
|
.SS "\fBtU32\fP tBigInt::m_blocks[\fBc_BigInt_MaxBlocks\fP]"
|
|
|
|
.PP
|
|
Definition at line 142 of file dragon4\&.cpp\&.
|
|
.PP
|
|
Referenced by BigInt_Add(), BigInt_Compare(), BigInt_DivideWithRemainder_MaxQuotient9(), BigInt_Multiply(), BigInt_Multiply10(), BigInt_Multiply2(), BigInt_Pow2(), BigInt_ShiftLeft(), GetBlock(), GetU32(), operator=(), SetU32(), and SetU64()\&.
|
|
.SS "\fBtU32\fP tBigInt::m_length"
|
|
|
|
.PP
|
|
Definition at line 141 of file dragon4\&.cpp\&.
|
|
.PP
|
|
Referenced by BigInt_Add(), BigInt_Compare(), BigInt_DivideWithRemainder_MaxQuotient9(), BigInt_Multiply(), BigInt_Multiply10(), BigInt_Multiply2(), BigInt_Pow2(), BigInt_ShiftLeft(), GetLength(), GetU32(), IsZero(), operator=(), SetU32(), SetU64(), and SetZero()\&.
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for amath from the source code\&.
|