int_mult_upper(3I)
_int_mult_upper, INT_MULT_UPPER - Multiplies integers and returns the uppermost bits
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME _int_mult_upper, INT_MULT_UPPER - Multiplies integers and returns the uppermost bits SYNOPSIS C/C++: #include <intrinsics.h> unsigned long _int_mult_upper (long i, long j) Fortran: INT_MULT_UPPER ([I=]i, [J=]j) IMPLEMENTATION C/C++: UNICOS/mk systems and UNICOS systems with IEEE floating-point hardware Fortran: UNICOS/mk systems, IRIX systems, and CRAY T90 systems that support IEEE floating-point arithmetic STANDARDS C/C++: Cray Research extension Fortran: CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90 IEEE Standard for Binary Floating-point Arithmetic DESCRIPTION This intrinsic function is not strictly related to IEEE arithmetic. It takes advantage of a hardware instruction on UNICOS/mk systems and on CRAY T90 systems that support IEEE floating-point arithmetic. This hardware instruction multiplies two 64-bit unsigned integers and returns the upper (leftmost) 64 bits of the 128-bit unsigned result. C/C++ NOTES Because _int_mult_upper is an intrinsic function, no externally visible library function is available for it. The compiler generates inline code to produce the result. FORTRAN NOTES INT_MULT_UPPER accepts the following arguments: i On UNICOS/mk systems and on CRAY T90 systems that support IEEE floating-point arithmetic, i must be of type INTEGER(KIND=8). On IRIX systems, it can also be of type INTEGER(KIND=4). It can be a scalar or an array. j On UNICOS/mk systems and on CRAY T90 systems that support IEEE floating-point arithmetic, j must be of type INTEGER(KIND=8). On IRIX systems, it can also be of type INTEGER(KIND=4). It can be a scalar or an array. If it is an array, it must be of the same shape as i. INT_MULT_UPPER is an elemental function. The name of this intrinsic cannot be passed as an argument. If i and j are scalar, the result is a scalar. If i is an array and j is scalar, the result is an array of the same shape as i in which each element is the result of the product of i i and j as described previously. If i is scalar and j is an array, the result is an array of the same shape as j and in which each element is the result of the product of i and j as described previously. i If both i and j are arrays, the result is an array of the same shape as i and in which each element is the result of the product of i and j i i as described previously. RETURN VALUES _int_mult_upper returns a 64-bit result, which is the upper (leftmost) 64 bits of the 128-bit result of the product of i and j. On UNICOS/mk systems and on CRAY T90 systems that support IEEE floating-point arithmetic, INT_MULT_UPPER returns the upper (leftmost) 64 bits of the 128-bit result of the product of i and j. On IRIX systems, INT_MULT_UPPER returns a 64-bit integer result if at least one of the arguments is a 64-bit integer; the 32-bit argument is converted to a 64-bit integer. If both i and j are INTEGER(KIND=4) arguments, the result is the upper (leftmost) 32 bits of the 64-bit result of the product of i and j. EXAMPLES Fortran example: ! Assume the following code is executed on a CRAY T90 IEEE. INTEGER ii(128), jj, result(128) ... ! Compute II and J. result = INT_MULT_UPPER(ii, jj) SEE ALSO A complete list of C/C++ intrinsic functions available on Cray Research systems is in the Cray C/C++ Reference Manual, publication SR-2179. Intrinsic Procedures Reference Manual, publication SR-2138, for the printed version of this man page.