I am trying to make a sigmoid which ranges from $-1$ to $1$.

I have found the formula $\dfrac{1}{​1+​e^{​\, ‑x}}-​0.5$ which creates a sigmoid between $-0.5$ and $0.5$

I need an equation that I can input $x$ and will get you the value for $y$

E.g. $y = x+5$

  • $\begingroup$ Why did you down vote? Please explain $\endgroup$
    – Rlz
    Apr 24, 2017 at 15:04

1 Answer 1


$y(x) = \frac{2}{1+e^{-x}} -1 = 2 \sigma(x) - 1 = \tanh(x/2)$, where $\sigma$ is the standard sigmoid and $\tanh$ is the hyperbolic tangent. Twice the range, shifted down by one. Pick your favorite form.

  • $\begingroup$ What would the equation be in the format of y= $\endgroup$
    – Rlz
    Apr 24, 2017 at 15:06
  • $\begingroup$ The y = was implied. $\endgroup$
    – Kaynex
    Apr 24, 2017 at 15:08
  • $\begingroup$ Oh ok didn't realise. Thanks for the good answer. I will accept it as the answer as soon as it lets me. Any idea why they down voted? $\endgroup$
    – Rlz
    Apr 24, 2017 at 15:09
  • $\begingroup$ They probably thought you could think this one through. $\endgroup$
    – andars
    Apr 24, 2017 at 15:10
  • 1
    $\begingroup$ Oh. Well that's a shame, some people need help with certain problems and that is the point of this website. Down voting because they know it and you don't spoils the point $\endgroup$
    – Rlz
    Apr 24, 2017 at 15:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .