2017 © Pedro Peláez
 

library bcmath

Convenience wrapper for the php bcmath extension.

image

edwardbrosens/bcmath

Convenience wrapper for the php bcmath extension.

  • Wednesday, January 24, 2018
  • by edwardbrosens
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

BCMath: bcmath made easy

Convenience wrapper for the php bcmath extension., (*1)



Installation

To install BCMath, run:, (*2)

$ composer require edwardbrosens/bcmath

Requirements

BCMath works with at least PHP 5.6 and HHVM., (*3)

Quick Start

require __DIR__ . '/vendor/autoload.php';

use \BCMath\BCMath;

// Add two arbitrary precision numbers
$a = BCMath::add(1, 2); // ($a = 3)
$b = BCMath::sub(2, 1); // ($b = 1)

Available Methods

BCMath::add($left_operand, $right_operand, $scale = null); // Add two arbitrary precision numbers
BCMath::sub($left_operand, $right_operand, $scale = null); // Subtract two arbitrary precision numbers
BCMath::mul($left_operand, $right_operand, $scale = null); // Multiply two arbitrary precision numbers
BCMath::div($left_operand, $right_operand, $scale = null); // Divide two arbitrary precision numbers
BCMath::mod($left_operand, $modulus); // Get modulus of an arbitrary precision number
BCMath::pow($left_operand, $right_operand, $scale = null); // Raise an arbitrary precision number to another
BCMath::sqrt($operand, $scale = null); // Get the square root of an arbitrary precision number
BCMath::scale ($scale); // Set default scale parameter for all BCMath and bcmath functions
BCMath::comp($left_operand, $right_operand, $scale = null); // Compare two arbitrary precision numbers
BCMath::powmod($left_operand, $right_operand, $modulus, $scale = null); // Raise an arbitrary precision number to another, reduced by a specified modulus

Run Tests

To run tests:, (*4)

$ git clone https://github.com/edwardbrosens/BCMath.git
$ composer install
$ ./vendor/bin/phpunit

Contribute

  1. Fork the repository on GitHub in order to make changes.
  2. Write one or more tests for the new feature you're implementing or a fix for the bug you found.
  3. Send a pull request to get your branch merged.

The Versions

24/01 2018

dev-master

9999999-dev https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

24/01 2018

0.1.4

0.1.4.0 https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

24/01 2018

dev-develop

dev-develop https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

24/01 2018

dev-feature/tdd-add-more-methods

dev-feature/tdd-add-more-methods https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

0.1.3

0.1.3.0 https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

dev-feature/fix-package-name

dev-feature/fix-package-name https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

dev-feature/update-readme

dev-feature/update-readme https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

dev-feature/tdd

dev-feature/tdd https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

dev-feature/bcmath

dev-feature/bcmath https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

dev-feature/deps

dev-feature/deps https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision

23/01 2018

dev-feature/setup-package

dev-feature/setup-package https://github.com/edwardbrosens/BCMath

Convenience wrapper for the php bcmath extension.

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-bcmath *

 

The Development Requires

by Edward Brosens

php class bcmath arbitrary-precision