Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

What does sgn mean?

Writer Sebastian Wright
$\begingroup$

I am reading "space filling curve" by Hans Sagan. On page 17, on equation (2.3.11) in the equation, a function sgn is used.

What is sgn?

To put it into context, in the book it says $h_n=$sgn$(n)[(n-1)+i]$

$\endgroup$ 2

2 Answers

$\begingroup$

Typically, $\operatorname{sgn}$ stands for the sign function $$\operatorname{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases}.$$

$\endgroup$ 9 $\begingroup$

I will expand on Dominik's answer.

$ \operatorname{sgn} $, standing for "sign", is usually defined as,

$$\operatorname{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases}.$$

but not always. Some use

$$\operatorname{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x < 0 \end{cases}.$$

(that is, $ \operatorname{sgn}(0) $ is undefined).

In rare cases, one might define $ \operatorname{sgn}(0) $ as one or zero, for convinience. It really depends on the situation and usecase.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy