Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
Dot Product OperatorWiP.DotProductOperator HistoryHide minor edits - Show changes to output 2015-09-22 13:07
by -
Added lines 1-2:
We may introduce a dot product operator in a future revision as follows: Added lines 13-14:
The operator might have precedence level-4, or an additional precedence level might be required above level-3 as it is a currently unresolved problem to have a dot product operator and an exponentiation operator both on the same precedence level because dot product cannot be repetitive, while exponentiation should ideally be repetitive. Potential solutions/alternatives are best tried out in a working compiler. 2015-09-22 12:58
by -
Added lines 1-10:
!!!!!! The Dot Product Operator Symbol @@*.@@ denotes the dot product operator. It is left associative and requires two operands. >>background-color:#f4f4f4 padding:0.5em border:'thin solid gray' whitespace:pre<< '''Example:''' dotProduct := v1 *. v2; (* dot product *) >><< The operator always represents the dot product operation. Its operands must be of a vector type with a cardinality of three and they must be type compatible. Its result type is the vector's component type. Any use of the operator with operands that do not meet these conditions shall cause a compile time error. The dot product operator is bindable. |