Sign

Command: Sign


Synopsis

integer Sign -1 0 or 1
double Sign -1 0 or 1
References

[1] The Mathematica Book "Sign"
File
lib/sli/mathematica.sli
Parameters

The return value is always an integer
Author
Diesmann
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.
FirstVersion