git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
More broken quadtree monstrosity.
[ipdf/code.git]
/
src
/
arbint.cpp
diff --git
a/src/arbint.cpp
b/src/arbint.cpp
index
df6da8d
..
8af84f9
100644
(file)
--- a/
src/arbint.cpp
+++ b/
src/arbint.cpp
@@
-271,7
+271,16
@@
string Arbint::Str(const string & base) const
{
string s("");
Arbint cpy(*this);
-
+ unsigned b = base.size();
+ while (cpy > Arbint(0L))
+ {
+ //Debug("cpy is %s", cpy.DigitStr().c_str());
+ unsigned c = (unsigned)(cpy % Arbint(b)).AsDigit();
+ s += base[c];
+ cpy /= Arbint(b);
+ }
+ if (m_sign)
+ s += '-';
reverse(s.begin(), s.end());
return s;
}
UCC
git Repository :: git.ucc.asn.au