Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.
/ decimal Public archive

PHP Decimal Handling library to overcome float rounding issues

License

Notifications You must be signed in to change notification settings

artkonekt/decimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Konekt Decimal

Travis Build Status Packagist Stable Version Packagist Dev Version Packagist downloads StyleCI MIT Software License

PHP Decimal Class

This library is a slightly streamlined remake of the php-decimal library

The PHP language only offers two numeric data types: int and float. Neither of these types are suitable for a substantial set of real-world problems, where exact arithmetic with values of arbitrary precision are required -- notably, when working with monetary values.

PHP's optional extension BCMath provides some limited features in this area, but it is awkward to use when precision is variable, and it does not support rounding.

This library uses the BCMath functions internally, but hides them behind a more convenient, object-oriented, and intuitive API.

Installation

using composer: composer require konekt/decimal

About

PHP Decimal Handling library to overcome float rounding issues

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages