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

Method Mul

extern/ttmath/ttmathint.h:439–462  ·  view source on GitHub ↗

! multiplication this = this * ss2 it returns carry if the result is too big (we're using the method from the base class but we have to make one correction in account of signs) */

Source from the content-addressed store, hash-verified

437 one correction in account of signs)
438 */
439 uint Mul(Int<value_size> ss2)
440 {
441 bool ss1_is_sign, ss2_is_sign;
442 uint c;
443
444 ss1_is_sign = IsSign();
445 ss2_is_sign = ss2.IsSign();
446
447 /*
448 we don't have to check the carry from Abs (values will be correct
449 because next we're using the method Mul from the base class UInt
450 which is without a sign)
451 */
452 Abs();
453 ss2.Abs();
454
455 c = UInt<value_size>::Mul(ss2);
456 c += CheckMinCarry(ss1_is_sign, ss2_is_sign);
457
458 if( ss1_is_sign != ss2_is_sign )
459 SetSign();
460
461 return c;
462 }
463
464
465 /*!

Callers 15

Sin0pi05Function · 0.45
ASin_0Function · 0.45
ASin_1Function · 0.45
ATan0Function · 0.45
ASinhFunction · 0.45
ACoshFunction · 0.45
DegToRadFunction · 0.45
RadToDegFunction · 0.45
DegToDegFunction · 0.45
GradToRadFunction · 0.45
RadToGradFunction · 0.45
DegToGradFunction · 0.45

Calls 3

AbsFunction · 0.85
IsSignMethod · 0.80
AbsMethod · 0.80

Tested by

no test coverage detected