About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/sign.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 sign Context: slangrtl

Synopsis

Compute the sign of a number

Syntax

y = sign(x)

Description

The sign function returns the sign of an arithmetic type. If its argument is a complex number (Complex_Type), it returns the sign of the imaginary part of the number. If the argument is an array, a new array will be created whose elements are obtained from the original array by using the sign function.

When applied to a real number or an integer, the sign function returns -1, 0, or +1 according to whether the number is less than zero, equal to zero, or greater than zero, respectively.

See Also

slangrtl
abs, conj, imag, mul2, real, sqr
Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.