NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

12.4 Arithmetic operators

The *, /, \, ^, Mod, +, and binary operators are called the arithmetic operators.

It is important to note that floating-point arithmetic operations may be performed with higher precision than the result type of the operation. For example, some hardware architectures support an "extended" or "long double" floating-point type with greater range and precision than the Double type, and implicitly perform all floating-point operations using this higher precision type. Only at excessive cost in performance can such hardware architectures be made to perform floating-point operations with less precision, and rather than require an implementation to forfeit both performance and precision, Visual Basic 7.0 allows a higher precision type to be used for all floating-point operations. Other than delivering more precise results, this rarely has any measurable effects. However, in expressions of the form x * y / z, where the multiplication produces a result that is outside the double range, but the subsequent division brings the temporary result back into the double range, the fact that the expression is evaluated in a higher range format may cause a finite result to be produced instead of an infinity.

ArithmeticOperatorExpression ::=
 MultiplicationOperatorExpression |
 DivisionOperatorExpression |
 ModuloOperatorExpression |
 ExponentOperatorExpression |
 AdditionOperatorExpression |
 SubtractionOperatorExpression