1
0
mirror of https://github.com/danog/math.git synced 2024-12-14 02:07:29 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Benjamin Morel
c343e0aeb9 Merge of() factory methods in BigNumber 2015-06-22 12:50:44 +02:00
Benjamin Morel
65d4dd75d6 Rename BigRational factory methods
- `BigRational::parse()` is now `of()`
- `BigRational::of()` is now `nd()`

This keeps BigRational in line with BigInteger and BigDecimal, whose `of()` factory method accepts a single parameter.
The new way to create a BigRational from two numbers is now called `nd()` for numerator/denominator.
2015-06-21 14:48:26 +02:00
Benjamin Morel
321c00281d CS fixes
Shorthand "int" and "bool" are now used instead of "integer" and "boolean".
This makes more sense as the latter are not accepted as synonyms in PHP 7 scalar type hints and return types.
2015-06-21 14:37:51 +02:00
Benjamin Morel
8f296871f2 Add BigRational::toBigDecimal() 2015-06-20 00:36:01 +02:00
Benjamin Morel
7ef1c1fa0d isFiniteDecimal() tests for negative values 2015-06-19 14:19:48 +02:00
Benjamin Morel
c9a518affc Add BigRational::isFiniteDecimal() 2015-06-19 14:10:31 +02:00
Benjamin Morel
095ae53a9b BigRational now implements Serializable
This allows for a more compact serialized representation.
2015-06-12 23:35:34 +02:00
Benjamin Morel
b1239d9f44 Add tests for lines not covered 2015-06-12 23:07:22 +02:00
Benjamin Morel
38e7c83089 Add a BigRational class to deal with fractions 2015-06-12 15:49:35 +02:00