Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran function "abs"

Status
Not open for further replies.

consideration

Programmer
Joined
Aug 19, 2005
Messages
4
Location
DE
hi,

can someone explain me the function "abs" of
the Fortran 77 language.
i have to transform it to a c++ function, but i
even don't know what "abs" does and how it is
built.

THANKS in Advance
 
I think it just returns the absolute value of a number.

abs probably works with floating point numbers (real*4)

iabs works with integers.

so abs( -31.0) gives 31.0.
 
C++ equivalents just to confuse you

Fortran abs = C++ fabs
Fortran iabs = C++ abs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top