Chapter 3 Ada Language Reference© National Instruments Corporation 3-31 AutoCode ReferenceMultiplication and Division FunctionsThe predefined multiplication and division operators for fixed-point typebased arguments are defined in Ada for any combination of fixed-pointarguments. The result of the computation is exact and of arbitrary accuracy.Thus, a conversion to the result type of the expression must be performed.During this conversion, accuracy might be lost. The implementation of thegeneric functions that perform multiplication and division use thepredefined operators and perform the conversion to the result type.32-Bit MultiplicationMultiplication of two 32-bit fixed-point numbers might not necessarily beexact. The problem is that the predefined operator is sometimes unable touse an extended 64-bit calculation to perform the operation. Thus, the resultmight not be exact. As a rule of thumb, if the sum of the radices of the typesof the operands is less than 31, the result should be exact. If that sum islarger than 31, loss of precision might occur.Note Computation of 32-bit values is compiler vendor dependent. Results comparedagainst the equivalent floating-point computation can vary significantly. The only solutionis to upgrade to a version of an Ada compiler that implements more robust fixed-pointnumerics.32-Bit DivisionDivision of two 32-bit fixed-point numbers might not be exact. Theproblem is that the predefined operator is sometimes unable to use anextended 64-bit calculation to perform the operation. Thus, the result mightnot be exact. As a rule of thumb, if the radix of the type of the denominatoris less than 16, the result should be exact; otherwise, loss of precision mightoccur.Conversion FunctionsValues from one data type (fixed-point or other type) might need to beconverted to another data type (fixed-point or other type). For anyconversion of a value that has type of lesser accuracy to a type with agreater accuracy, loss of precision will not occur, but overflow is possible.For example, a value represented in RT_SSHORT01 converted toRT_SSHORT03 will not lose accuracy, unless the value overflows.However, when converting a value that has a type of greater accuracy toa type that has a lesser accuracy, loss of precision will occur, but there is