steven79 / calc
float point calculator php
dev-master
2018-08-03 12:26 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-10-15 01:33:51 UTC
README
php float point library
Installation
This library is installable via Composer.
Just define the following requirement in your composer.json
file:
{ "repositories": [{ "type": "package", "package": { "name": "steven79/calc", "version": "1.0.0", "source": { "url": "https://github.com/choyunsung/calc", "type": "git", "reference": "master" } } }], "require": { "steven79/calc": "*" } }
Overview
The constructors of the classes are not public, you must use a factory method to obtain an instance. Example:
include '/vendor/autoload.php'; echo "+: ".steven\calc('111111111111111.10987654321 + 111111.22',8); echo "/: ".steven\calc('111111111.1111111111 / 111111111.22',8); echo "*: ".steven\calc('111111.1111111111 * 1111111.22',8); echo "-: ".steven\calc('111111111.1111111111 - 111111111.22',8);