Sent from Ultimail in OS/2
//--- forwarded letter -------------------------------------------------------
|> Message-Id: <[log in to unmask]>
|> X-List: [log in to unmask]
|> X-Unsub: To leave, send text 'leave comp-fortran-90' to
[log in to unmask]
|> X-List-Unsubscribe: <mailto:[log in to unmask]>
|> Errors-To: [log in to unmask]
|> Precedence: listMIME-Version: 1.0
|> Date: Wed, 14 Oct 98 16:25:21 +0200
|> From: [log in to unmask]
|> To: [log in to unmask]
|> Reply-To: [log in to unmask]
|> Subject: MOD and MODULO functions
|> Hello all ,
|>
|> I have a question about the functions MOD(A,P) and MODULO((A,P).
|>
|> Pour les deux fonctions , when P = 0 , the result is processor dependent.
|>
|> With the compiler f90 Sun Workshop 4.2 f90 v1.2 (WorkShop Compilers 4.2
|> 01 Dec 1997 FORTRAN 90 1.2 patch 104366-04 ), I have the following results :
|>
|> => RES = MOD(A,P) with P = 0 --> Arithmetic Exception + core dumped
,
|>
|> => RES = MODULO(A,P) with P = 0 --> RES = 0
|>
|> Are there a reason to explain these various implementations ?
Yes, the result is processor dependent.
Dividing by zero (p = 0) is indeterminate.
|> Thanks in advance
|>
|> Best regards
|>
|> *-------------------------------------------------------*
|> * *
|> * Jean Claude BERGES *
|> * Centre Spatial de Toulouse *
|> * e-mail: [log in to unmask] *
|> *-------------------------------------------------------*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|