martinlindhe/php-number-presentation

Some utility classes to work with numbers.

0.1.5 2015-08-12 17:46 UTC

This package is auto-updated.

Last update: 2024-11-23 03:52:39 UTC


README

Some utility classes to work with numbers.

  • BigNumber is a class which internally uses bcmath for high precision numeric caluclations.

  • NaturalNumberSwedish parses natural language (Swedish) into numbers

  • NumberBase is a class for converting values between different number bases.

  • RationalNumber is a class to work with rational numbers, like "3/4"

  • RomanNumber is a class for converting between roman numbers

  • MathSymbol has some helpers for printing exponents in superscript or subscript (UTF-8)

  • NumberList is a helper for converting a natural language list of numbers to an array

Installation

composer require martinlindhe/php-number-presentation

Usage

See examples