Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Ecommerce] Default rounding mode for decimals to PHP_ROUND_HALF_UP #3738
I am curious as to why round to even was chosen as the default rounding method in this ecommerce context. Would it not make sense to replace it with PHP_ROUND_HALF_UP in the Decimal class instead?
In the following scenario, the prices shown to the customer to not line up because the 0.5 cents are rounded down in the discount and in the grant total: