Add, subtract, multiply, and divide with specified rounding direction.

CAUTION: This is still untested and undebugged code. Only divRound
has been even slightly tested.
This commit is contained in:
JoelKatz
2013-03-10 21:22:01 -07:00
parent 92318a47bd
commit 27a7ac75de
3 changed files with 280 additions and 0 deletions

View File

@@ -7,6 +7,12 @@ static int BN_add_word64(BIGNUM *a, uint64 w)
return BN_add(a, &bn, a);
}
static int BN_sub_word64(BIGNUM *a, uint64 w)
{
CBigNum bn(w);
return BN_sub(a, &bn, a);
}
static int BN_mul_word64(BIGNUM *a, uint64 w)
{
CBigNum bn(w);