This library contains ports of the following libraries to MakeCode:
- Google's JavaScript BigInt library, a.k.a. JSBI and
- MikeMcl's big.js library
- (Perhaps) Daninet's exactnumber library
This will start as a TypeScript-only implementation; it eventually will include support for the Blocks interface.
- Change namespace to
BigNum
. - Add appropriate jsdoc and cleanup documentation.
- Allow creation from boolean.
- Add annotations to enhance debugger support.
- Allow
number
arguments to operations where supported. - Implement method chaining to support things like
a.multiply(x).add(b).mod(m).mod(p)
. - Add remaining JSBI operations.
- Right shift.
- Add BigInt constants.
- BigInt.Zero
- BigInt.One
- BigInt.Two
- BigInt.NegativeOne
- Add BigInt.IsPrime (Use Miller deterministic algorithm.)
- Add tests from
big.js
library.- Streamline testing where appropriate.
- Backport appropriate tests to BigInt.
- Add
big.js
library. - Add
exactnumber.ts
library.
Open this page at https://robo-technical-group.github.io/pxt-arcade-bignum/
This repository can be added as an extension in MakeCode.
- open https://arcade.makecode.com/
- click on New Project
- click on Extensions under the gearwheel menu
- search for https://github.com/robo-technical-group/pxt-arcade-bignum and import
To edit this repository in MakeCode.
- open https://arcade.makecode.com/
- click on Import then click on Import URL
- paste https://github.com/robo-technical-group/pxt-arcade-bignum and click import
This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.
- for PXT/arcade