Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Jan 15, 2023
1 parent 8d60a34 commit 0ad82ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## UNRELEASED (0.11.0)
## [0.11.0](https://github.com/brick/math/releases/tag/0.11.0) - 2023-01-16

💥 **Breaking changes**

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ existing code, etc.), `y` is incremented.

**When a breaking change is introduced, a new `0.x` version cycle is always started.**

It is therefore safe to lock your project to a given release cycle, such as `^0.10`.
It is therefore safe to lock your project to a given release cycle, such as `^0.11`.

If you need to upgrade to a newer release cycle, check the [release history](https://github.com/brick/math/releases)
for a list of changes introduced by each further `0.x.0` version.
Expand All @@ -47,20 +47,20 @@ for a list of changes introduced by each further `0.x.0` version.

This library provides the following public classes in the `Brick\Math` namespace:

- [BigNumber](https://github.com/brick/math/blob/0.10.0/src/BigNumber.php): base class for `BigInteger`, `BigDecimal` and `BigRational`
- [BigInteger](https://github.com/brick/math/blob/0.10.0/src/BigInteger.php): represents an arbitrary-precision integer number.
- [BigDecimal](https://github.com/brick/math/blob/0.10.0/src/BigDecimal.php): represents an arbitrary-precision decimal number.
- [BigRational](https://github.com/brick/math/blob/0.10.0/src/BigRational.php): represents an arbitrary-precision rational number (fraction).
- [RoundingMode](https://github.com/brick/math/blob/0.10.0/src/RoundingMode.php): holds constants for the rounding modes.
- [BigNumber](https://github.com/brick/math/blob/0.11.0/src/BigNumber.php): base class for `BigInteger`, `BigDecimal` and `BigRational`
- [BigInteger](https://github.com/brick/math/blob/0.11.0/src/BigInteger.php): represents an arbitrary-precision integer number.
- [BigDecimal](https://github.com/brick/math/blob/0.11.0/src/BigDecimal.php): represents an arbitrary-precision decimal number.
- [BigRational](https://github.com/brick/math/blob/0.11.0/src/BigRational.php): represents an arbitrary-precision rational number (fraction).
- [RoundingMode](https://github.com/brick/math/blob/0.11.0/src/RoundingMode.php): holds constants for the rounding modes.

And the following exceptions in the `Brick\Math\Exception` namespace:

- [MathException](https://github.com/brick/math/blob/0.10.0/src/Exception/MathException.php): base class for all exceptions
- [DivisionByZeroException](https://github.com/brick/math/blob/0.10.0/src/Exception/DivisionByZeroException.php): thrown when a division by zero occurs
- [IntegerOverflowException](https://github.com/brick/math/blob/0.10.0/src/Exception/IntegerOverflowException.php): thrown when attempting to convert a too large `BigInteger` to `int`
- [NumberFormatException](https://github.com/brick/math/blob/0.10.0/src/Exception/NumberFormatException.php): thrown when parsing a number string in an invalid format
- [RoundingNecessaryException](https://github.com/brick/math/blob/0.10.0/src/Exception/RoundingNecessaryException.php): thrown when the result of the operation cannot be represented without explicit rounding
- [NegativeNumberException](https://github.com/brick/math/blob/0.10.0/src/Exception/NegativeNumberException.php): thrown when attempting to calculate the square root of a negative number
- [MathException](https://github.com/brick/math/blob/0.11.0/src/Exception/MathException.php): base class for all exceptions
- [DivisionByZeroException](https://github.com/brick/math/blob/0.11.0/src/Exception/DivisionByZeroException.php): thrown when a division by zero occurs
- [IntegerOverflowException](https://github.com/brick/math/blob/0.11.0/src/Exception/IntegerOverflowException.php): thrown when attempting to convert a too large `BigInteger` to `int`
- [NumberFormatException](https://github.com/brick/math/blob/0.11.0/src/Exception/NumberFormatException.php): thrown when parsing a number string in an invalid format
- [RoundingNecessaryException](https://github.com/brick/math/blob/0.11.0/src/Exception/RoundingNecessaryException.php): thrown when the result of the operation cannot be represented without explicit rounding
- [NegativeNumberException](https://github.com/brick/math/blob/0.11.0/src/Exception/NegativeNumberException.php): thrown when attempting to calculate the square root of a negative number

### Overview

Expand Down Expand Up @@ -174,7 +174,7 @@ echo BigInteger::of(999)->dividedBy(3); // 333
echo BigInteger::of(1000)->dividedBy(3); // RoundingNecessaryException
```

You can pass an optional [rounding mode](https://github.com/brick/math/blob/0.10.0/src/RoundingMode.php) to round the result, if necessary:
You can pass an optional [rounding mode](https://github.com/brick/math/blob/0.11.0/src/RoundingMode.php) to round the result, if necessary:

```php
echo BigInteger::of(1000)->dividedBy(3, RoundingMode::DOWN); // 333
Expand All @@ -197,7 +197,7 @@ You can even get both at the same time:
##### BigDecimal

Dividing a `BigDecimal` always requires a scale to be specified. If the exact result of the division does not fit in
the given scale, a [rounding mode](https://github.com/brick/math/blob/0.10.0/src/RoundingMode.php) must be provided.
the given scale, a [rounding mode](https://github.com/brick/math/blob/0.11.0/src/RoundingMode.php) must be provided.

```php
echo BigDecimal::of(1)->dividedBy('8', 3); // 0.125
Expand Down

0 comments on commit 0ad82ce

Please sign in to comment.