home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
calculat
/
sm30a.zip
/
ABS.(X)
< prev
next >
Wrap
Text File
|
1993-10-16
|
258b
|
11 lines
# abs(x) is the absolute value function of x. The value of abs(x)
# is real number >=0. abs(x)=|x|.
# e.g. abs(-2) gives 2, abs(-i) gives 1
abs(zero) := zero
abs(e) := e
abs(pi) := pi
abs(inf) := inf
abs(-zero) := zero
abs(x_) := if(x>0, x, -x)