Download the PHP package samsara/fermat without Composer

On this page you can find all versions of the php package samsara/fermat. 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 fermat

Fermat

CircleCI Test Coverage Maintainability Latest Stable Version Total Downloads License

This project is unit tested against 8.1, and merges are not accepted unless the tests pass.

Installation

To install, simply require the package using composer:

composer require "samsara/fermat:^2.1"

Or include it in your composer.json file:

The project namespace is Samsara\Fermat\Core\*. You can view the project on Packagist.

Modules

Modules are the namespaces outside of Samsara\Fermat\Core and provide functionality beyond integer, decimal, and rational numbers.

All of these modules depend on the Core namespace, while some depend on each other to various degrees.

Documentation

The Samsara\Fermat\Core\Numbers factory class provides a way to use the Value classes in Fermat without being as specific as those classes may require. Consider the following code:

Note that the make() method allows you to provide both an int and a string as the value. In fact, it also allows you to provide a float. The first argument is the specific class that will be used for the value, the second argument is the value itself. The third and fourth arguments are optional and represent the scale (in number of decimal places) and the base of the number respectively. The scale and base arguments will only accept integer values.

If you do not specify a scale value, and you are using the default values, it automatically has a scale of either 10, or the string length of the input value, whichever is greater.

Here is an example of using the factory method to make a value that is in a base other than base10:

You can also use a Fraction and Number together:

You can read the full documentation for Fermat here.

Contributing

Please ensure that pull requests meet the following guidelines:

For more information, please see the section on Contributing


All versions of fermat with dependencies

PHP Build Version
Package Version
Requires riimu/kit-baseconversion Version ^1
samsara/common Version ^1
php-ds/php-ds Version ^1.1
php Version >=8.0
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 samsara/fermat contains the following files

Loading the files please wait ....