Skip to content

Commit 1d7a1f9

Browse files
authored
Merge pull request kokke#16 from monolifed/patch-1
update API section in README.md
2 parents cb8b539 + 8ba8364 commit 1d7a1f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ struct bn
3737

3838
This is the public / exported API:
3939
```C
40+
/* Initialization functions: */
4041
void bignum_init(struct bn* n); /* n gets zero-initialized */
4142
void bignum_from_int(struct bn* n, DTYPE_TMP i);
4243
int bignum_to_int(struct bn* n);
@@ -49,6 +50,7 @@ void bignum_sub(struct bn* a, struct bn* b, struct bn* c); /* c = a - b */
4950
void bignum_mul(struct bn* a, struct bn* b, struct bn* c); /* c = a * b */
5051
void bignum_div(struct bn* a, struct bn* b, struct bn* c); /* c = a / b */
5152
void bignum_mod(struct bn* a, struct bn* b, struct bn* c); /* c = a % b */
53+
void bignum_divmod(struct bn* a, struct bn* b, struct bn* c, struct bn* d); /* c = a/b, d = a%b */
5254

5355
/* Bitwise operations: */
5456
void bignum_and(struct bn* a, struct bn* b, struct bn* c); /* c = a & b */
@@ -63,6 +65,7 @@ int bignum_is_zero(struct bn* n); /* For comparison wit
6365
void bignum_inc(struct bn* n); /* Increment: add one to n */
6466
void bignum_dec(struct bn* n); /* Decrement: subtract one from n */
6567
void bignum_pow(struct bn* a, struct bn* b, struct bn* c); /* Calculate a^b -- e.g. 2^10 => 1024 */
68+
void bignum_isqrt(struct bn* a, struct bn* b); /* Integer square root -- e.g. isqrt(5) => 2 */
6669
void bignum_assign(struct bn* dst, struct bn* src); /* Copy src into dst -- dst := src */
6770
```
6871

0 commit comments

Comments
 (0)