MCPcopy Create free account
hub / github.com/c3d/tao3D / Plus

Method Plus

libcryptopp/cryptopp/integer.cpp:3538–3559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3536}
3537
3538Integer Integer::Plus(const Integer& b) const
3539{
3540 Integer sum((word)0, STDMAX2(reg.size(), b.reg.size()));
3541 if (NotNegative())
3542 {
3543 if (b.NotNegative())
3544 PositiveAdd(sum, *this, b);
3545 else
3546 PositiveSubtract(sum, *this, b);
3547 }
3548 else
3549 {
3550 if (b.NotNegative())
3551 PositiveSubtract(sum, b, *this);
3552 else
3553 {
3554 PositiveAdd(sum, *this, b);
3555 sum.sign = Integer::NEGATIVE;
3556 }
3557 }
3558 return sum;
3559}
3560
3561Integer& Integer::operator+=(const Integer& t)
3562{

Callers 4

operator+Function · 0.45
operator+Function · 0.45
operator+Function · 0.45

Calls 4

NotNegativeFunction · 0.85
PositiveAddFunction · 0.85
PositiveSubtractFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected