All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. At least so much as we feel like it.
- Added
RoundingProvider
and New Rounding Modes @JordanRL (#115) - Added
subFactorial()
method @JordanRL (#114)
- Added
RoundingProvider
and New Rounding Modes @JordanRL (#115) - Added
subFactorial()
method @JordanRL (#114)
2.1.1 - 2021-06-29
- RandomProvider: A provider to supply random numbers.
- randomInt(): Supplies a random integer.
- randomDecimal(): Supplies a random decimal between 0 and 1 (inclusive)
- randomReal(): Supplies a random real number.
- Composer: Removed dependency on ircmaxell/random-lib, as it was outdated and is now replaced with Fermat's RandomProvider.
2.1.0 - 2021-06-27
- NumberCollection: Added the method
selectScale()
to return the int value of the largest scale among all collection members.
2.0.1 - 2021-06-26
- Composer: Fixed an issue with dependencies that created errors for libraries which include this as a dependency.
2.0.0 - 2021-06-26
- Providers:
- Distributions:
- Base: Distribution abstract class
- ArithmeticProvider:
- Added a scale argument to all methods that were missing it.
- PolyfillProvider
- SequenceProvider:
nthFibonacciNumber
function
- StatsProvider:
- Added docblocks for all methods
- Added
gammaFunction
function
- Distributions:
- Types:
- Base:
- Interfaces:
- BaseConversionInterface
- ComplexInterface
- DecimalInterface:
- Added hyperbolic trig functions
- Added
exp()
- NumberInterface:
- Added
isComplex(): bool
method
- Added
- MatrixInterface
- NumberCollectionInterface
- Number:
- numberOfTotalDigits()
- numberOfIntDigits()
- numberOfDecimalDigits()
- numberOfSigDecimalDigits()
- isComplex()
- asComplex()
- Interfaces:
- Traits:
- ArithmeticTrait
- ComparisonTrait
- IntegerMathTrait
- InverseTrigonometryTrait
- LogTrait
- ScaleTrait
- TrigonometryTrait:
- Added implementation of hyperbolic trig functions
- ComplexNumber
- Coordinate
- Decimal
- Expression
- Matrix
- NumberCollection
- Base:
- Values:
- Algebra
- PolynomialFunction
- Geometry
- CoordinateSystems
- CartesianCoordinate
- CylindricalCoordinate
- PolarCoordinate
- SphericalCoordinate
- CoordinateSystems
- ImmutableComplexNumber
- ImmutableFraction:
- Added implementation of
isComplex(): bool
- Added implementation of
- ImmutableMatrix
- ImmutableNumber:
- Added implementation of
isComplex(): bool
- Added implementation of
- MutableComplexNumber
- MutableFraction:
- Added implementation of
isComplex(): bool
- Added implementation of
- MutableMatrix
- MutableNumber:
- Added implementation of
isComplex(): bool
- Added implementation of
- Algebra
- Factories:
- Collections
- ComplexNumbers
- Matrices
- Composer:
- Suggested:
- ext-stats: * (As this library is no longer maintained and unavailable on PHP 7+, it is being removed)
- Suggested:
- Providers:
- SequenceProvider
- Removed empty
nthSecTanCoefNumber
function until an implementation exists
- Removed empty
- SequenceProvider
- Providers:
- Distributions:
- Removed references to ext-stats in all distributions
- Fixed missing @throws in docblocks in all distributions
- Now extend
Distribution
abstract class - Use the randomInt() method in PolyfillProvider instead of RandomLib directly
- SequenceProvider:
- Allowed
nthEvenNumber()
,nthOddNumber()
,nthPowerNegativeOne()
,nthEulerZigzag()
, andnthFibonacciNumber()
to return windows of the sequence as a NumberCollection object
- Allowed
- Distributions:
- Types:
- Base:
- Interfaces:
- ALL: Changed namespace from
Samsara\Fermat\Core\Types\Base
toSamsara\Fermat\Core\Types\Base\Interfaces
- DecimalInterface:
- Changed signature of
log10()
andln()
to$scale = null
instead of$scale = 10
- Changed type of
$scale
parameter inlog10()
andln()
fromint
toint|null
- Changed signature of
- NumberInterface:
- Moved the
convertToBase()
method to the newBaseConversionInterface
- Moved the
- ALL: Changed namespace from
- Traits:
- ArithmeticTrait:
- Updated all arithmetic functions to work with imaginary numbers, complex numbers, and negative numbers (square root)
- ArithmeticTrait:
- Number:
- Changed namespace from
Samsara\Fermat\Core\Types
toSamsara\Fermat\Core\Types\Base
- Moved many methods into traits
- Now passes the scale setting to ALL calls to
ArithmeticProvider
allowing scale up to 2147483646 digits. - Trig functions are now arbitrary scale
- numberOfLeadingZeros() now returns
int
type, as was originally intended
- Changed namespace from
- Interfaces:
- Fraction:
- Moved many methods into traits
- Base:
- Providers:
- Distributions:
- Exponential:
- Fixed accidental cast to float in
random
function
- Fixed accidental cast to float in
- Exponential:
- SequenceProvider:
- Fixed erroneous limit on Euler Zigzag sequence index (45 -> 50) and updated exception to reflect current limit (39 -> 50)
- Distributions:
- Types:
- Traits:
- LogTrait:
- Fixed
$scale
to work the way it does in other functions forlog10()
andln()
- Fixed
- LogTrait:
- Tuple:
- Changed the constructor so that it properly works with either parameter collection or a single array
- ImmutableNumber:
- Fixed the problem with scale in continuousModulo()
- MutableNumber:
- Fixed the problem with scale in continuousModulo()
- Traits:
1.0.2 - 2017-01-16
- DecimalInterface
- Added the following to correctly reflect usage:
- tan()
- cot()
- sec()
- csc()
- arcsin()
- arccos()
- arctan()
- arccot()
- arcsec()
- arccsc()
- Added the following to correctly reflect usage:
1.0.1 - 2017-01-16
- Composer
- Dependencies:
- samsara/common: dev-master -> 1.*
- Dependencies:
- Composer
- Dependencies:
- riimu/kit-baseconversion: v1.*
- ircmaxell/random-lib: v1.1.*
- php-ds/php-ds: v1.1.*
- samsara/common: dev-master
- ext-bcmath: *
- Dev Dependencies:
- phpunit/phpunit: v5.7.*
- Suggested:
- ext-ds: *
- ext-stats: * (NOTE: This extension can't be used because it is not available for PHP 7+)
- ext-gmp: *
- Dependencies:
- Types:
- Interfaces:
- CoordinateInterface
- DecimalInterface
- FractionInterface
- NumberInterface
- Fraction
- Number
- Tuple
- Interfaces:
- Values:
- CartesianCoordinate
- ImmutableFraction
- ImmutableNumber
- MutableFraction
- MutableNumber
- Providers:
- Distributions:
- Exponential
- Normal
- Poisson
- ArithmeticProvider
- SequenceProvider
- SeriesProvider
- StatsProvider
- TrigonometryProvider
- Distributions: