First I apologize in advance for I don't know math's English at all and I haven't done math in almost a decade.
I'm looking for a function whose "domain/ensemble of definition" would be ℝ (or maybe ℤ) and whose "ensemble/domain of variation" would be ℕ{0, 1} that would look like something this awesome ascii graph...
^f(x)
|
|
1________ | __________
0________\./__________>x
0|
|
|
|
f(x) is always 1, but 0 when x = 0
Actually I need this for programming, I could always find other ways to do what I wanted with booleans so far but it would be much better in most cases to have a simple algebra formula to represent my needs instead.
I just hope it's not too complicated a function to write/understand and that it exists of course. Thanks in advance guys.