I don't know Fortran very well, so excuse this stupid question!
Is there something like a signum function in Fortran 77?
What is it called? sgn doesn't work!
Bye,
Boris
--
----------------------------------------------------------
Boris Breidenbach
CERN Summer Student
Contact:
boris.br...@cern.ch
pa0...@stud.uni-wuppertal.de
----------------------------------------------------------
-|Hi!
-|
-|I don't know Fortran very well, so excuse this stupid question!
-|Is there something like a signum function in Fortran 77?
-|What is it called? sgn doesn't work!
-|
-|Bye,
-|Boris
Herman D. (Skip) Knoble, Research Associate
Mailto:h...@psu.edu
Web: http://www.personal.psu.edu/hdk
Center for Academic Computing
Penn State University
214C Computer Building
University Park, PA 16802-2101
Phone:+1 814 865-0818 Fax:+1 814 863-7049
sgn is not in the ftn intrinsic fcn set, however you can cut your own
with just a few lines of code, or use intrinsic "sign" fcn with a mod to
account for the difference (at 0) between the two. i.e.
sgn = sign(1,x)
if(x .eq. 0.) sgn = 0
--
T.Silva
-----------------------------------------------
Modeling * Simulation * Analysis
http://www.sdynamix.com
-----------------------------------------------