fatint 2.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 44

fatint

Dart library for arbitrary sized integer values. Dart VM by default supports arbitrary sized integers but it is not the case when compiled to Javascript on the browser. This package provides a common big number interface for DartVM and browser and provides respective implementations.

Simple examples

BigInteger i1 = bigInt(25) % bigInt(7); // => 4
BigInteger i2 = bigHex('abcd1234') * bigHex('beef'); // => 0x802297f6968c

Advantage

  • Clean API complying to to Dart's int
  • Efficient equations using BigIntegerRef and zero

Changelog

2.0.0

  • BigIntJs: JS implementation of BigInt

Breaking changes

  • BigInt: BigInteger
  • BigIntVm: BigIntegerVm
  • BigIntRef: BigIntegerRef

1.0.0

  • BigInteger interface desing
  • BigIntegerVM: VM implementation of BigInteger
  • BigIntegerRef for writing efficient equations
  • EfficientBigMath for writing efficient equations

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fatint: "^2.0.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:fatint/fatint.dart';
  
Version Uploaded Documentation Archive
2.0.0 Jan 5, 2018 Go to the documentation of fatint 2.0.0 Download fatint 2.0.0 archive
1.0.0 Jan 4, 2018 Go to the documentation of fatint 1.0.0 Download fatint 1.0.0 archive

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
11 / 100
Health:
Code health derived from static analysis. [more]
68 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
88 / 100
Overall score:
Weighted score of the above. [more]
44
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:fatint/fatint.dart.

Suggestions

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 22 errors 4 warnings 11 hints.

    Strong-mode analysis of lib/src/bignum.dart failed with the following error:

    line: 64 col: 14
    The return type 'BigIntVm' isn't a 'BigInt', as defined by the method 'from8'.

    Strong-mode analysis of lib/src/js/js.dart gave the following warning:

    line: 12 col: 27
    Element 'BigInt' from SDK library 'core.dart' is implicitly hidden by 'bignum.dart'.

    Similar analysis of the following files failed:

    • lib/src/vm/vm.dart (warning)
  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use fatint.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
biginteger_js ^1.0.1 1.0.1
rational ^0.1.11 0.1.11 0.2.0
Transitive dependencies
js 0.6.1
Dev dependencies
browser ^0.10.0
dart_to_js_script_rewriter ^1.0.1
test ^0.12.0