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
Lazy + CPU/GPU rendering toggle in script.
[ipdf/code.git]
/
src
/
paranoidnumber.cpp
diff --git
a/src/paranoidnumber.cpp
b/src/paranoidnumber.cpp
index
40071e1
..
efae860
100644
(file)
--- a/
src/paranoidnumber.cpp
+++ b/
src/paranoidnumber.cpp
@@
-432,14
+432,13
@@
ParanoidNumber * ParanoidNumber::OperationTerm(ParanoidNumber * b, Optype op, Pa
#ifdef PARANOID_SIZE_LIMIT
if (m_size >= PARANOID_SIZE_LIMIT)
{
#ifdef PARANOID_SIZE_LIMIT
if (m_size >= PARANOID_SIZE_LIMIT)
{
+ this->operator=(this->Digit());
if (op == ADD)
if (op == ADD)
- {
- m_value += b->Digit() / GetFactors();
- }
+ m_value += b->Digit();
else
else
- {
-
m_value -= b->Digit() / GetFactors()
;
- }
+ m_value -= b->Digit();
+
m_size = 0
;
+ Debug("Cut off %p", this);
return b;
}
//Debug("At size limit %d", m_size);
return b;
}
//Debug("At size limit %d", m_size);
@@
-567,15
+566,14
@@
ParanoidNumber * ParanoidNumber::OperationFactor(ParanoidNumber * b, Optype op,
#ifdef PARANOID_SIZE_LIMIT
if (m_size >= PARANOID_SIZE_LIMIT)
{
#ifdef PARANOID_SIZE_LIMIT
if (m_size >= PARANOID_SIZE_LIMIT)
{
+ this->operator=(this->Digit());
if (op == MULTIPLY)
m_value *= b->Digit();
else
m_value /= b->Digit();
if (op == MULTIPLY)
m_value *= b->Digit();
else
m_value /= b->Digit();
-
- for (auto n : m_next[ADD])
- delete n->OperationFactor(new ParanoidNumber(*b), op);
- for (auto n : m_next[SUBTRACT])
- delete n->OperationFactor(new ParanoidNumber(*b), op);
+ m_size = 0;
+
+ Debug("Cut off %p", this);
return b;
}
return b;
}
UCC
git Repository :: git.ucc.asn.au