Download the PHP package marcoconsiglio/bcmath-extended without Composer

On this page you can find all versions of the php package marcoconsiglio/bcmath-extended. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bcmath-extended

GitHub License GitHub Release Static Badge
Static Badge Static Badge Static Badge

bcmath-extended

This PHP library extends the BCMath PHP estension. Since the class BCMath\Number is a final class, this library extends through composition with a child class (Number).

It was inspired by krowinski/bcmath-extended.

Index

Installation

Features

Base features

The following list of features of the Number class are the same as those found in BCMath\Number:

Missing base features

These are the missing features:

Added features

This list consists of the new features added in this library:

Input types

This is the input types set available:

String numeric format

For example "1234567.89" is allowed while "1,234,567.89" is not.

Notes

* Consideration on modulo operation

As already pointed by krowinsky in PHP issue #76287

the modulo operation in BCMath extension is not correct in case the modulus is negative. Therefore in this library the following formula is used:

$$ a \pmod n = a - n \times \left \lfloor {\dfrac{a}{n}} \right \rfloor $$

With this formula a negative modulus $n$ is allowed.

** Consideration on float type

If you need to convert a float to Number and back, prepare for the worst. Keep in mind that floating point arithmetic is full of hidden flaws, that's why aribtrary arithmetic is needed (in this case implemented by BcMath PHP extension).

While this library accept a float type input, it is not recommended to cast a Number instance to float, otherwise nasty things could happen.

Use this library only for end calculations, like print a report. If other subsystem of your software need float type inputs, it is strongly advised to avoid this library for intermediate calculations.

API documentation

You can find the API documentation at docs/html/index.html.


All versions of bcmath-extended with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-bcmath Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marcoconsiglio/bcmath-extended contains the following files

Loading the files please wait ...