Summary: Use parentheses to override operator precedence in Windows PowerShell.
How can I ensure that a math expression that keeps returning incorrect information will work properly in
Windows PowerShell?
In Windows PowerShell (as in other languages), math operators have a precedence. Therefore, division
comes before addition. If you want to override this behavior, group with parentheses, for example:
PS C:\> 2 + 9 / 3
(2 + 9)/3
5
3.66666666666667