(j3.2006) is MOD (INT_MIN, -1) legal?

Michael Ingrassia michaeli
Mon Oct 27 18:01:21 EDT 2008


Jim's question prompted another question in my mind that luckily has an
easy answer from the text.

Q.  Is MOD(A,P) where A and P are integers specified only for
integer model numbers A and P, or for any integers?   In particular,
for Jim's INT_MIN which is not a model number, should MOD(INT_MIN, -1)
be specified by 13.7.80 ?

A. The numeric models in 13.4 are explicitly provided only for
"the numeric manipulation and inquiry functions".   MOD is neither so the
integer model is irrelevant.

I'm a little suspicious of my answer though because although I find lists of
inquiry functions in Fortran 2003 I couldn't find any lists of
"numeric manipulation" intrinsics in Fortran 2003 or Fortran 2008.
MOD is an Elemental Function by class and is listed as a Numeric function
in Fortran 2003, so maybe somebody thinks it is a numeric manipulation
function.  Maybe we even say so somewhere and I missed it.  Maybe (not to
be too subtle) "numeric manipulation" language should be cleared up.

If so, I'd have to change my answer.

	--Michael I.




More information about the J3 mailing list