Rate This Document
Findability
Accuracy
Completeness
Readability

Description and Constraints

  1. The input and output of matrix operators are of the double type.
  2. When the double-type input is used for calculation, the value multiplying by 10 raised to the power of the given precision is validated to fit within a 32-bit representation to ensure the calculation result does not overflow. However, results of the subsequent internal u64 operations may exceed the u64 limit.
  3. For the cryptographic matrix multiplication operator, errors may occur in double-type calculations: The input data is rounded off based on the precision settings. For example, if the precision is set to 2, the third decimal place of the input data is rounded off, and therefore the input data has two decimal places. In addition, the calculation result is truncated according to the precision settings. For example, if the precision is set to 2, the calculation result retains only two decimal places, and other higher decimal places are discarded. If the decimal place increase is not involved during the calculation of other arithmetic operators, the actual calculation result is output.
  4. row and col must be the same as the actual number of rows and columns of the input matrix, respectively. In addition, for matrix multiplication, the product C of matrices A (m × n) and B (p × q) is valid only when n equals p. The dimensions of the matrix C are m × q.