rational 0.1.11

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 77

Dart Rational

Build Status

This project enable to make computations on rational numbers. The package also contains an implementation of arbitrarily sized integer that works with dart2js.

Usage

To use this library in your code :

  • add a dependency in your pubspec.yaml :
dependencies:
  rational: ^0.1.9

Rational numbers

  • add import in your dart code :
import 'package:rational/rational.dart';
  • Start computing using Rational.parse('1.23') or new Rational(12, 7).

BigInt numbers

  • add import in your dart code :
import 'package:rational/bigint.dart';
  • Start computing using BigInt.parse('12345678901234567890').

License

Apache 2.0

v0.1.11 (2017-06-16)

  • add types.

v0.1.10+1 (2017-02-19)

v0.1.10 (2017-02-19)

v0.1.9 (2016-06-10)

v0.1.8+1 (2014-10-29)

  • fix a bug for Rational.precision on negative number.

v0.1.8 (2014-10-29)

  • fix bugs with dart2js
  • add Rational.signum
  • add Rational.hasFinitePrecision
  • add Rational.precision
  • add Rational.scale

v0.1.7 (2014-10-07)

  • Rational.parse accepts strings in scientific notation (eg. 1.5e-3).

v0.1.6 (2014-10-06)

  • BigInt.parse accepts an optional prepending + for positive integers.

Semantic Version Conventions

http://semver.org/

  • Stable: All even numbered minor versions are considered API stable: i.e.: v1.0.x, v1.2.x, and so on.
  • Development: All odd numbered minor versions are considered API unstable: i.e.: v0.9.x, v1.1.x, and so on.

1. Depend on it

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


dependencies:
  rational: "^0.1.11"

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 packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rational/rational.dart';
        
Version Uploaded Documentation Archive
0.1.11 Jun 16, 2017 Go to the documentation of rational 0.1.11 Download rational 0.1.11 archive
0.1.10+1 Feb 19, 2017 Go to the documentation of rational 0.1.10+1 Download rational 0.1.10+1 archive
0.1.10 Feb 19, 2017 Go to the documentation of rational 0.1.10 Download rational 0.1.10 archive
0.1.9 Jun 10, 2016 Go to the documentation of rational 0.1.9 Download rational 0.1.9 archive
0.1.8+1 Oct 29, 2014 Go to the documentation of rational 0.1.8+1 Download rational 0.1.8+1 archive
0.1.8 Oct 29, 2014 Go to the documentation of rational 0.1.8 Download rational 0.1.8 archive
0.1.7 Oct 7, 2014 Go to the documentation of rational 0.1.7 Download rational 0.1.7 archive
0.1.6 Oct 6, 2014 Go to the documentation of rational 0.1.6 Download rational 0.1.6 archive
0.1.5 Jul 25, 2014 Go to the documentation of rational 0.1.5 Download rational 0.1.5 archive
0.1.4 Mar 11, 2014 Go to the documentation of rational 0.1.4 Download rational 0.1.4 archive

All 17 versions...

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
58 / 100
Health:
Code health derived from static analysis. [more]
94 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
77

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

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

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use rational.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=0.8.10+6 <2.0.0
Dev dependencies
test ^0.12.0