matmul intrinsic procedure

Richard E Maine Richard.Maine@nasa.gov
Thu Jun 30 20:40:00 GMT 2005


On Jun 30, 2005, at 1:11 PM, Jan Stanisław Owoc wrote:

> If there was some way I could get an exact specification for the 
> intrinsic
> procedure "matmul",

It is in the standard, or pretty much any textbook. As specs go, it is 
pretty short. My informal summary is

1. You presumably know what matrix multiplication means. If not, it 
spells it out.

2. It must handle rank2*rank2, rank1*rank2, and rank2*rank1.

3. It must work with all types and kinds of numeric arguments (integer, 
real, and complex, with all KIND values), with the "usual" rules for 
handling type mixing. (You really ought to know the "usual" rules to do 
any kind of implementation work... or even much programming).

4. It also must work with all kinds of logicals, with .or. playing the 
role of addition and .and. playing the role of multiplication.

P.S. Is it really not yet implemented in gfortran? That sort of 
surprises me, but I haven't actually checked.

-- 
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                             |        -- Mark Twain



More information about the Fortran mailing list