The keypad is used to enter operators into the expression being formed. The following table describes the meaning of each key on the pad.

Key | Genstat Expression | Mathematical expression | Notes | Description |

C = A + B | c_{i} = a_{i} + b_{i} |
Element-wise addition | ||

C = A − B | c_{i} = a_{i} − b_{i} |
Element-wise subtraction | ||

C = A * B | c_{i} = a_{i} × b_{i} |
1 | Element-wise multiplication | |

C = A / B | c_{i} = a_{i} / b_{i} |
Element-wise division | ||

C = A .AND. B | c_{i} = a_{i} ∧ b_{i} |
2,3 | Element-wise AND operation | |

C = A .OR. B | c_{i} = a_{i} ∨ b_{i} |
2,4 | Element-wise OR operation | |

C = A .EQS. B | c_{i} = 1.0 if a_{i} = b_{i}c _{i} = 0.0 if a_{i} ≠ b_{i} |
5 | Element-wise string equality | |

C = A .NES. B | c_{i} = 0.0 if a_{i} = b_{i}c _{i} = 1.0 if a_{i} ≠ b_{i} |
5 | Element-wise string inequality | |

C = A ** B | c_{i} = a_{i}^{bi} |
Element-wise exponentiation | ||

C = A *+ B | C = AB | 6 | Matrix product | |

( | ( | Left bracket. Used to control order of evaluation. Can be nested as many times as required | ||

) | ) | Right bracket. | ||

C = A == B | c_{i} = 1.0 if a_{i} = b_{i}c _{i} = 0.0 if a_{i} ≠ b_{i} |
Element-wise test of equality. Can also be typed in as .EQ. | ||

C = A /= B | c_{i} = 1.0 if a_{i} ≠ b_{i}c _{i} = 0.0 if a_{i} = b_{i} |
Element-wise test of inequality. Can also be typed in as .NE. | ||

C = A < B | c_{i} = 1.0 if a_{i} < b_{i}c _{i} = 0.0 if a_{i} ≥ b_{i} |
Element-wise less than. Can also be typed in as .LT. | ||

C = A <= B | c_{i} = 1.0 if a_{i} ≤ b_{i}c _{i} = 0.0 if a_{i} > b_{i} |
Element-wise less than or equal to. Can also be typed in as .LE. | ||

C = A > B | c_{i} = 1.0 if a_{i} > b_{i}c _{i} = 0.0 if a_{i} ≤ b_{i} |
Element-wise greater than. Can also be typed in as .GT. | ||

C = A >= B | c_{i} = 1.0 if a_{i} ≥ b_{i}c _{i} = 0.0 if a_{i} < b_{i} |
Element-wise greater than or equal to. Can also be typed in as .GE. | ||

C = A .IN. B | c_{i} = 1.0 if a_{i} ∈ Bc _{i} = 0.0 if a_{i} ∉ b_{i} |
7 | Element-wise test of set inclusion | |

C = A .NI. B | c_{i} = 1.0 if a_{i} ∈ Bc _{i} = 0.0 if a_{i} ∉ b_{i} |
7 | Element-wise test of set non-inclusion | |

B = NOT(A) | b_{i} = ¬ a_{i} |
Element-wise logical negation (NOT). | ||

C = A .IS. B | 8,9 | Logical test of equivalence of identifiers. In the calculation C=A.IS.B the result C is 1 if A and B are identifiers of the same data structure, after any necessary substitutions (for example if B is a dummy in a FOR loop). The result is 0 if the identifiers are different. | ||

C = A .ISNT. B | 8,9 | Logical test of non-equivalence of identifiers | ||

C = A .EOR. B | Element-wise exclusive OR operation |

### Notes

- For matrices, c
_{ij}= a_{ij}× b_{ij}; for matrix multiplication see *+ - Zero is treated as FALSE as non-zero as TRUE. Logical TRUE and FALSE results are set to 1.0 and 0.0 respectively
- If either a
_{i}or b_{i}is missing-value, the result is set to missing - If one of a
_{i}or b_{i}is missing-value, the result is set to the non-missing value; if both are missing, the result is missing - Both operands A and B must be text; the result is a variate
- Operands must be matrices, symmetric matrices, or diagonal matrices of conformable dimensions
- Operands may be text or numerical
- Operator with scalar result
- Operands may be of different sizes