factorion-math

Crates.iofactorion-math
lib.rsfactorion-math
version1.0.1
created_at2025-07-27 20:50:01.494104+00
updated_at2025-10-18 12:54:17.58876+00
descriptionThe math (factorials and related functions) used by factorion
homepage
repositoryhttps://github.com/tolik518/factorion-bot/
max_upload_size
id1770412
size144,734
Anatolij Vasilev (tolik518)

documentation

README

Factorion Math

The math functions used by factorion. (Factorials and related functions) All functions that take [Integer]s, but internally use [Float]s, not only have a float alternative, but also take in a precision.

This crate uses [rug] in its interface. It is re-exported for convenience.

Features

  • k-factorials in exact, float, approximate, approximate digits
  • termials in exact, float, approximate, approximate digits
  • k-termials in exact, approximate, approximate digits
  • subfactorials in exact, approximate, approximate digits

Calculations are split in areas:

  • exact: integer calculation (accuracy)
  • float: float calculation (decimals)
  • approximate: approximation of integer calculation using float as a * 10^b (large numbers)
  • approximate digits: approximation of integer calculation using float as 10^b (extremely large numbers)

Formulas and their derivations are available in MATH.md

Commit count: 924

cargo fmt