# Command: Sign

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    Sign - returns the sign of its argument

Synopsis:

      integer Sign -1,0, or 1
      double  Sign -1,0, or 1

Description:

      The C++ standard library does not define a sign function because
      there is no general agreement on the return value for 0. The function
      Sign implements the decision made for Mathematica: if the argument is
      0, Sign returns 0.

Parameters:

      The return value is always an integer

References:

      [1] The Mathematica Book "Sign"

Author:

    Diesmann

FirstVersion:

    2007.11.28

SeeAlso:

- UnitStep
- abs

Source:

    /opt/conda/conda-bld/nest_1531570948828/work/lib/sli/mathematica.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative