TYPERULES Type Rules for Operators
Section: Mathematical Operators
UsageStarting with FreeMat 4.0, the type of
yis determined according to the same rules as Matlab. These are the rules:
- Integer types of the same class can be combined. The answer is the same type as the inputs, and the operation is performed using saturating arithmetic. Integer types can also be combined with double precision values (again, the result is of the integer type).
- Single precision floating point values can be combined with double precision, logical and character array classes. The result is of class single.
- Double precision floating point values can be combined with all other types. Except as noted above, the output is of double precision.