2017 © Pedro Peláez
 

library math

General Math Library

image

joshuaestes/math

General Math Library

  • Wednesday, March 11, 2015
  • by joshuaestes
  • Repository
  • 0 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 167 % Grown

The README.md

Math

General purpose math library for php that allows you to switch between various math extension such as BC Math and GMP., (*1)

Features

  • Support for GMP
  • Support for BC Math
  • Auto select based on server configuration

Installation

Composer

composer.phar require "joshuaestes/math:~0.2@dev"

Usage

<?php

$math = new \Math\Math(new \Math\Extension\AutoExtension());

$result = $math->add(2, 2);
// $result == 4

Extensions

This project currently supports only a few extensions., (*2)

GMP Extension

Use the GNU Multiple Precision PHP extension., (*3)

$math = new \Math\Math(new \Math\Extension\GmpExtension());

BC Math Extension

Uses the BC Math PHP extension., (*4)

$math = new \Math\Math(new \Math\Extension\BcMathExtension());

Auto Select Extension

This extension selects the best possible extension based on your current server configuration. It includes all the extensions, if you know what your system uses, it's advisable to just use that extension., (*5)

Roll Your Own Extension

All extensions implement the ExtensionInterface. You are free to use implement this interface to create your own unique extension. Feel free to contribute back by checking out CONTRIBUTING.md., (*6)

How to contribute?

See CONTRIBUTING.md, (*7)

Change log

See CHANGELOG.md, (*8)

License (MIT)

Copyright (c) 2015 Joshua Estes, (*9)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*10)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*11)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*12)

The Versions

11/03 2015

dev-master

9999999-dev https://github.com/JoshuaEstes/Math

General Math Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

math gmp bcmath

11/03 2015

0.1.0

0.1.0.0 https://github.com/JoshuaEstes/Math

General Math Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

math gmp bcmath