The sign function (for real numbers in mathematics) is defined in relation to numerical comparison to zero.
Any other meaning of sign refering to visual representations has little practical value, IMHO: should sgn("-(-1)") be -1 ?
So "returning the sign" as the "documented behaviour" for me matches exactly the behaviour of the spaceship zero
In reply to Re^4: Spaceship Zero
by pKai
in thread Spaceship Zero
by Orchew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |