infinity 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 57

Infinity #

CodeFactor

Big number library for dart #

Numbers range: 10^-(10^^1e308) - 10^^1e308

This library is meant for idle/clicker games where numbers go really high and precision is not that important

Inspiration and idea for this came from Patashu's break eternity.

Usage:

Going past infinity

Infinity _doubleInfinity = Infinity.fromNum(double.maxFinite);
Infinity _result = _doubleInfinity ^ _doubleInfinity;
print(_result);

prints: ee310.74362528890225

Most operators are usable, and can be mixed with normal numbers:

// Infinity is at 1.7976931348623157e+308 so 1e310 is too big for double
Infinity _reallyBigNumber = Infinity.fromString('1e310');

Infinity _result = _reallyBigNumber / 2;
print(_result);

prints: 5.0e309

[1.0.1] - 22.04.2020. #

  • Add example

[1.0.0] - 22.04.2020. #

  • First release, stable

example/main.dart

import 'package:infinity/infinity.dart';

void main() {
  /// From number
  Infinity _infinity = Infinity.fromNum(1);

  /// From string multiple possibilities
  Infinity _pentateString = Infinity.fromString('2^^^3');
  Infinity _tetrateString = Infinity.fromString('2^^3');
  Infinity _powString = Infinity.fromString('2^3');

  Infinity _eString = Infinity.fromString('2e3');

  Infinity _eeeString = Infinity.fromString('4e4e4');
}

Use this package as a library

1. Depend on it

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


dependencies:
  infinity: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:infinity/infinity.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
13
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
57
Learn more about scoring.

We analyzed this package on Jul 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15

Health suggestions

Format lib/infinity/_internal/_egg.dart.

Run dartfmt to format lib/infinity/_internal/_egg.dart.

Format lib/infinity/_internal/add_layer.dart.

Run dartfmt to format lib/infinity/_internal/add_layer.dart.

Format lib/infinity/_internal/from_string_handlers.dart.

Run dartfmt to format lib/infinity/_internal/from_string_handlers.dart.

Fix additional 20 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/infinity/abbreviations/abs.dart (Run dartfmt to format lib/infinity/abbreviations/abs.dart.)
  • lib/infinity/abbreviations/round.dart (Run dartfmt to format lib/infinity/abbreviations/round.dart.)
  • lib/infinity/comparison/comparison.dart (Run dartfmt to format lib/infinity/comparison/comparison.dart.)
  • lib/infinity/functions/exponential.dart (Run dartfmt to format lib/infinity/functions/exponential.dart.)
  • lib/infinity/functions/factorial.dart (Run dartfmt to format lib/infinity/functions/factorial.dart.)
  • lib/infinity/functions/lambert.dart (Run dartfmt to format lib/infinity/functions/lambert.dart.)
  • lib/infinity/functions/logarithm.dart (Run dartfmt to format lib/infinity/functions/logarithm.dart.)
  • lib/infinity/functions/trigonometry.dart (Run dartfmt to format lib/infinity/functions/trigonometry.dart.)
  • lib/infinity/infinity.dart (Run dartfmt to format lib/infinity/infinity.dart.)
  • lib/infinity/infinity_constants.dart (Run dartfmt to format lib/infinity/infinity_constants.dart.)
  • lib/infinity/logger.dart (Run dartfmt to format lib/infinity/logger.dart.)
  • lib/infinity/operators/add.dart (Run dartfmt to format lib/infinity/operators/add.dart.)
  • lib/infinity/operators/divide.dart (Run dartfmt to format lib/infinity/operators/divide.dart.)
  • lib/infinity/operators/log.dart (Run dartfmt to format lib/infinity/operators/log.dart.)
  • lib/infinity/operators/modulo.dart (Run dartfmt to format lib/infinity/operators/modulo.dart.)
  • lib/infinity/operators/multiply.dart (Run dartfmt to format lib/infinity/operators/multiply.dart.)
  • lib/infinity/operators/pow.dart (Run dartfmt to format lib/infinity/operators/pow.dart.)
  • lib/infinity/operators/root.dart (Run dartfmt to format lib/infinity/operators/root.dart.)
  • lib/infinity/operators/subtract.dart (Run dartfmt to format lib/infinity/operators/subtract.dart.)
  • lib/infinity/operators/tetrate.dart (Run dartfmt to format lib/infinity/operators/tetrate.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
Dev dependencies
test any