Skip to content

robo-technical-group/pxt-arcade-bignum

 
 

Repository files navigation

Big numbers for MakeCode

This library contains ports of the following libraries to MakeCode:

This will start as a TypeScript-only implementation; it eventually will include support for the Blocks interface.

TODO

  • 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/

Use as Extension

This repository can be added as an extension in MakeCode.

Edit this project Build status badge

To edit this repository in MakeCode.

Blocks preview

This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.

A rendered view of the blocks

Metadata (used for search, rendering)

  • for PXT/arcade
<script src="https://makecode.com/gh-pages-embed.js"></script><script>makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");</script>

About

Port of the BigInt and BigJS JavaScript libraries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.6%
  • Other 0.4%