MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / Add

Method Add

extern/ttmath/ttmathint.h:219–227  ·  view source on GitHub ↗

! this method adds two value with a sign and returns a carry we're using methods from the base class because values are stored with U2 we must only make the carry correction this = p1(=this) + p2 when p1>=0 i p2>=0 carry is set when the highest bit of value is set when p1<0 i p2<0 carry is set when the highest bit of value is clear when p1>=0 i p2<0 carry will never be set wh

Source from the content-addressed store, hash-verified

217 when p1<0 i p2>=0 carry will never be set
218 */
219 uint Add(const Int<value_size> & ss2)
220 {
221 bool p1_is_sign = IsSign();
222 bool p2_is_sign = ss2.IsSign();
223
224 UInt<value_size>::Add(ss2);
225
226 return CorrectCarryAfterAdding(p1_is_sign, p2_is_sign);
227 }
228
229
230 /*!

Callers 15

CeilFunction · 0.45
Sin0pi05Function · 0.45
CosFunction · 0.45
ASin_0Function · 0.45
ASin_1Function · 0.45
ATan0Function · 0.45
ATan01Function · 0.45
CoshFunction · 0.45
TanhFunction · 0.45
CothFunction · 0.45
ASinhFunction · 0.45
ACoshFunction · 0.45

Calls 1

IsSignMethod · 0.80

Tested by

no test coverage detected