Skip to content

Extends php BCMath lib for missing functions like floor, ceil, round, abs, min, max, rand for big numbers. Also wraps existing BCMath functions.

License

Notifications You must be signed in to change notification settings

krowinski/bcmath-extended

Repository files navigation

bcmath-extended

Build Status Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License

Extends php BCMath lib for missing functions like floor, ceil, round, abs, min, max, rand for big numbers. Also wraps existing BCMath functions. (more http://php.net/manual/en/book.bc.php)

Installation

composer require krowinski/bcmath-extended

Features

  • new tool methods
    • convertScientificNotationToString - converts scientific notation to string
    • getScale - gets current global scale
  • new math functions
    • round
    • abs
    • rand
    • max
    • min
    • roundDown
    • roundUp
    • ceil
    • fmod
  • proxy for original functions (http://php.net/manual/en/book.bc.php)
  • all functions supports scientific notation
  • all functions are static so it can be easy replaced by this lib

About

Extends php BCMath lib for missing functions like floor, ceil, round, abs, min, max, rand for big numbers. Also wraps existing BCMath functions.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages