Apparently I'm the only one in the world who does not know the meaning of
the SIGN instruction in Fortran!
Thanks to the numerous people who have answered.
For the ones who, like me, do not know it:
SIGN (or sign transfert function)
X=SIGN(A,B)
means
if(B>=0) then X=ABS(A)
else X=-ABS(A)
S. VAN SINT JAN
--------------------------------------------------------------------------
Serge VAN SINT JAN, Ph.D. | phone: + 44 1908 695511 (ext. 4146)
School of Computing Sciences | + 44 1908 834933
De Montfort University | fax: + 44 1908 834948
Hammerwood Gate | email: sintjans@dmu.ac.uk
Milton Keynes MK7 6HP - UK | WWW: http://homepages.ulb.ac.be/~sintjans
--------------------------------------------------------------------------
the SIGN instruction in Fortran!
Thanks to the numerous people who have answered.
For the ones who, like me, do not know it:
SIGN (or sign transfert function)
X=SIGN(A,B)
means
if(B>=0) then X=ABS(A)
else X=-ABS(A)
S. VAN SINT JAN
--------------------------------------------------------------------------
Serge VAN SINT JAN, Ph.D. | phone: + 44 1908 695511 (ext. 4146)
School of Computing Sciences | + 44 1908 834933
De Montfort University | fax: + 44 1908 834948
Hammerwood Gate | email: sintjans@dmu.ac.uk
Milton Keynes MK7 6HP - UK | WWW: http://homepages.ulb.ac.be/~sintjans
--------------------------------------------------------------------------