Releases: JordanRL/Fermat
Releases · JordanRL/Fermat
v2.1.1
Added
- 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.
Changed
- Composer: Removed dependency on ircmaxell/random-lib, as it was outdated and is now replaced with Fermat's RandomProvider.
v2.1.0
v2.0.1
v2.0.0
Moved to a module based system, resulting in many of these changes being moved to separate repositories. Please consult the README.md file for more details.
Added
- 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
Removed
- 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
Changed
- 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\Types\Base
toSamsara\Fermat\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\Types
toSamsara\Fermat\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:
Fixed
- 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:
v1.0.2
v1.0.1
v1.0.0
Added
- 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:
- Numbers:
- CartesianCoordinate
- Currency
- ImmutableFraction
- ImmutableNumber
- MutableFraction
- MutableNumber
- Providers:
- Distributions:
- Exponential
- Normal
- Poisson
- ArithmeticProvider
- SequenceProvider
- SeriesProvider
- StatsProvider
- TrigonometryProvider
- Distributions: