fixed issues/typos with docs
This commit is contained in:
parent
723a418d74
commit
f8f1fb2de3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
34
docs/API.md
34
docs/API.md
|
@ -43,7 +43,7 @@ The absolute value of a
|
|||
|
||||
#### Defined in
|
||||
|
||||
[abs.ts:8](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/abs.ts#L8)
|
||||
[abs.ts:8](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/abs.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
|
@ -67,7 +67,7 @@ The bit length
|
|||
|
||||
#### Defined in
|
||||
|
||||
[bitLength.ts:7](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/bitLength.ts#L7)
|
||||
[bitLength.ts:7](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/bitLength.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
|
@ -80,7 +80,7 @@ Take positive integers a, b as input, and return a triple (g, x, y), such that a
|
|||
|
||||
**`Throws`**
|
||||
|
||||
This excepction is thrown if a or b are less than 0
|
||||
RangeError if a or b are <= 0
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -97,7 +97,7 @@ A triple (g, x, y), such that ax + by = g = gcd(a, b).
|
|||
|
||||
#### Defined in
|
||||
|
||||
[egcd.ts:18](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/egcd.ts#L18)
|
||||
[egcd.ts:17](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/egcd.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
|
@ -105,7 +105,7 @@ ___
|
|||
|
||||
▸ **gcd**(`a`, `b`): `bigint`
|
||||
|
||||
Greatest-common divisor of two integers based on the iterative binary algorithm.
|
||||
Greatest common divisor of two integers based on the iterative binary algorithm.
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -122,7 +122,7 @@ The greatest common divisor of a and b
|
|||
|
||||
#### Defined in
|
||||
|
||||
[gcd.ts:10](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/gcd.ts#L10)
|
||||
[gcd.ts:10](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/gcd.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
|
@ -147,7 +147,7 @@ The least common multiple of a and b
|
|||
|
||||
#### Defined in
|
||||
|
||||
[lcm.ts:10](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/lcm.ts#L10)
|
||||
[lcm.ts:10](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/lcm.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
|
@ -155,7 +155,7 @@ ___
|
|||
|
||||
▸ **max**(`a`, `b`): `number` \| `bigint`
|
||||
|
||||
Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<=b
|
||||
Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<b
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -172,7 +172,7 @@ Maximum of numbers a and b
|
|||
|
||||
#### Defined in
|
||||
|
||||
[max.ts:9](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/max.ts#L9)
|
||||
[max.ts:9](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/max.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
|
@ -180,7 +180,7 @@ ___
|
|||
|
||||
▸ **min**(`a`, `b`): `number` \| `bigint`
|
||||
|
||||
Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<=b
|
||||
Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<b
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -197,7 +197,7 @@ Minimum of numbers a and b
|
|||
|
||||
#### Defined in
|
||||
|
||||
[min.ts:9](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/min.ts#L9)
|
||||
[min.ts:9](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/min.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
|
@ -209,7 +209,7 @@ Modular inverse.
|
|||
|
||||
**`Throws`**
|
||||
|
||||
Excpeption thorwn when a does not have inverse modulo n
|
||||
RangeError if a does not have inverse modulo n
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -226,7 +226,7 @@ The inverse modulo n
|
|||
|
||||
#### Defined in
|
||||
|
||||
[modInv.ts:14](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/modInv.ts#L14)
|
||||
[modInv.ts:13](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/modInv.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
|
@ -238,7 +238,7 @@ Modular exponentiation b**e mod n. Currently using the right-to-left binary meth
|
|||
|
||||
**`Throws`**
|
||||
|
||||
Excpeption thrown when n is not > 0
|
||||
RangeError if n <= 0
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -256,7 +256,7 @@ b**e mod n
|
|||
|
||||
#### Defined in
|
||||
|
||||
[modPow.ts:16](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/modPow.ts#L16)
|
||||
[modPow.ts:15](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/modPow.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
|
@ -272,7 +272,7 @@ a and b must be the same type, either number or bigint
|
|||
|
||||
**`Throws`**
|
||||
|
||||
Excpeption thrown when n is not > 0
|
||||
RangeError if n <= 0
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
@ -289,4 +289,4 @@ A bigint with the smallest positive representation of a modulo n
|
|||
|
||||
#### Defined in
|
||||
|
||||
[toZn.ts:15](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/toZn.ts#L15)
|
||||
[toZn.ts:14](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/toZn.ts#L14)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#### Defined in
|
||||
|
||||
[egcd.ts:2](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/egcd.ts#L2)
|
||||
[egcd.ts:2](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/egcd.ts#L2)
|
||||
|
||||
___
|
||||
|
||||
|
@ -26,7 +26,7 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[egcd.ts:3](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/egcd.ts#L3)
|
||||
[egcd.ts:3](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/egcd.ts#L3)
|
||||
|
||||
___
|
||||
|
||||
|
@ -36,4 +36,4 @@ ___
|
|||
|
||||
#### Defined in
|
||||
|
||||
[egcd.ts:4](https://github.com/juanelas/bigint-mod-arith/blob/905ba66/src/ts/egcd.ts#L4)
|
||||
[egcd.ts:4](https://github.com/juanelas/bigint-mod-arith/blob/723a418/src/ts/egcd.ts#L4)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,8 +10,7 @@ export interface Egcd {
|
|||
* @param a
|
||||
* @param b
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* This excepction is thrown if a or b are less than 0
|
||||
* @throws {@link RangeError} if a or b are <= 0
|
||||
*
|
||||
* @returns A triple (g, x, y), such that ax + by = g = gcd(a, b).
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { abs } from './abs'
|
||||
/**
|
||||
* Greatest-common divisor of two integers based on the iterative binary algorithm.
|
||||
* Greatest common divisor of two integers based on the iterative binary algorithm.
|
||||
*
|
||||
* @param a
|
||||
* @param b
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<=b
|
||||
* Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<b
|
||||
*
|
||||
* @param a
|
||||
* @param b
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<=b
|
||||
* Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<b
|
||||
*
|
||||
* @param a
|
||||
* @param b
|
||||
|
|
|
@ -6,8 +6,7 @@ import { toZn } from './toZn'
|
|||
* @param a The number to find an inverse for
|
||||
* @param n The modulo
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* Excpeption thorwn when a does not have inverse modulo n
|
||||
* @throws {@link RangeError} if a does not have inverse modulo n
|
||||
*
|
||||
* @returns The inverse modulo n
|
||||
*/
|
||||
|
|
|
@ -8,8 +8,7 @@ import { toZn } from './toZn'
|
|||
* @param e exponent
|
||||
* @param n modulo
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* Excpeption thrown when n is not > 0
|
||||
* @throws {@link RangeError} if n <= 0
|
||||
*
|
||||
* @returns b**e mod n
|
||||
*/
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
* @param a - An integer
|
||||
* @param n - The modulo
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* Excpeption thrown when n is not > 0
|
||||
* @throws {@link RangeError} if n <= 0
|
||||
*
|
||||
* @returns A bigint with the smallest positive representation of a modulo n
|
||||
*/
|
||||
|
|
|
@ -10,8 +10,7 @@ export interface Egcd {
|
|||
* @param a
|
||||
* @param b
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* This excepction is thrown if a or b are less than 0
|
||||
* @throws {@link RangeError} if a or b are <= 0
|
||||
*
|
||||
* @returns A triple (g, x, y), such that ax + by = g = gcd(a, b).
|
||||
*/
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"egcd.d.ts","sourceRoot":"","sources":["../src/ts/egcd.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AACD;;;;;;;;;;;GAWG;AACH,wBAAgB,IAAI,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,IAAI,CA4B9D"}
|
||||
{"version":3,"file":"egcd.d.ts","sourceRoot":"","sources":["../src/ts/egcd.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AACD;;;;;;;;;;GAUG;AACH,wBAAgB,IAAI,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,IAAI,CA4B9D"}
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Greatest-common divisor of two integers based on the iterative binary algorithm.
|
||||
* Greatest common divisor of two integers based on the iterative binary algorithm.
|
||||
*
|
||||
* @param a
|
||||
* @param b
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<=b
|
||||
* Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<b
|
||||
*
|
||||
* @param a
|
||||
* @param b
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<=b
|
||||
* Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<b
|
||||
*
|
||||
* @param a
|
||||
* @param b
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
* @param a The number to find an inverse for
|
||||
* @param n The modulo
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* Excpeption thorwn when a does not have inverse modulo n
|
||||
* @throws {@link RangeError} if a does not have inverse modulo n
|
||||
*
|
||||
* @returns The inverse modulo n
|
||||
*/
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"modInv.d.ts","sourceRoot":"","sources":["../src/ts/modInv.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,MAAM,CAOlE"}
|
||||
{"version":3,"file":"modInv.d.ts","sourceRoot":"","sources":["../src/ts/modInv.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,MAAM,CAOlE"}
|
|
@ -5,8 +5,7 @@
|
|||
* @param e exponent
|
||||
* @param n modulo
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* Excpeption thrown when n is not > 0
|
||||
* @throws {@link RangeError} if n <= 0
|
||||
*
|
||||
* @returns b**e mod n
|
||||
*/
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"modPow.d.ts","sourceRoot":"","sources":["../src/ts/modPow.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,MAAM,CA0BpF"}
|
||||
{"version":3,"file":"modPow.d.ts","sourceRoot":"","sources":["../src/ts/modPow.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,MAAM,CA0BpF"}
|
|
@ -7,8 +7,7 @@
|
|||
* @param a - An integer
|
||||
* @param n - The modulo
|
||||
*
|
||||
* @throws {RangeError}
|
||||
* Excpeption thrown when n is not > 0
|
||||
* @throws {@link RangeError} if n <= 0
|
||||
*
|
||||
* @returns A bigint with the smallest positive representation of a modulo n
|
||||
*/
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"toZn.d.ts","sourceRoot":"","sources":["../src/ts/toZn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,MAAM,CAUhE"}
|
||||
{"version":3,"file":"toZn.d.ts","sourceRoot":"","sources":["../src/ts/toZn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,EAAE,MAAM,GAAC,MAAM,GAAG,MAAM,CAUhE"}
|
Loading…
Reference in New Issue