README.md
# gleam_stats
[](https://hex.pm/packages/gleam_stats)
[](https://hexdocs.pm/gleam_stats/)
A Gleam mathematics and statistics library. The library supports both targets: Erlang and JavaScript.
The repository is available on:
- [Github](https://github.com/nicklasxyz/gleam_stats)
The documentation is hosted on:
- [HexDocs](https://hexdocs.pm/gleam_stats/)
## Installation
The library is available on [Hex](https://hex.pm/packages/gleam_stats) so it can be added to your Gleam project by simply running:
```sh
gleam add gleam_stats
```
### Disclaimer
To align the Gleam and Javascript implementation of the library, the JavaScript implementation utilizes the [decimal.js](https://github.com/MikeMcl/decimal.js) library **internally** for computations that require arbitrary precision integers and floating-point values. However, the input and output of the different functions in the JavaScript implementation of the library are still constrained by the precision of the JS [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) primitive.
## Development
```sh
# Run the tests
gleam test
# Build docs (requires python library 'lxml'):
gleam docs build && cd utils && python inject.py && cd ..
```