int_mult_upper(3I)
_int_mult_upper, INT_MULT_UPPER - Multiplies integers and returns the uppermost bits
As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.
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) STANDARDS C/C++ extension Fortran extension to the Fortran standard DESCRIPTION This intrinsic function takes advantage of a hardware instruction on IRIX systems that support IEEE floating-point arithmetic. This hardware instruction multiplies two 32-bit integers, as if they were unsigned, and returns the upper (leftmost) 32 bits of the 64-bit unsigned result. NOTES C/C++ 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 INT_MULT_UPPER accepts the following arguments: i i can be of type INTEGER(KIND=8) or of type INTEGER(KIND=4). It can be a scalar or an array. j j can be of type INTEGER(KIND=8) or of 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 ii 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 ji as described previously. 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 ii and ji as described previously. RETURN VALUES 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 JJ result = INT_MULT_UPPER(ii, jj)