RoundingMode::HALF_EVEN
Rounds towards the "nearest neighbor" unless both neighbors are equidistant, in which case rounds towards the even neighbor.
Behaves as for HALF_UP if the digit to the left of the discarded fraction is odd; behaves as for HALF_DOWN if it's even.
Note that this is the rounding mode that statistically minimizes cumulative error when applied repeatedly over a sequence of calculations. It is sometimes known as "Banker's rounding", and is chiefly used in the USA.
File
-
vendor/
ramsey/ uuid/ src/ Math/ RoundingMode.php, line 145
Class
- RoundingMode
- Specifies a rounding behavior for numerical operations capable of discarding precision.
Namespace
Ramsey\Uuid\MathCode
public const HALF_EVEN = 9;