rpmdoestuff's blog

By rpmdoestuff, history, 8 months ago, In English

If you want a variable to be the negative of itself, do you use n = -n, n *= -1, or other methods? If so, suggest some methods down below.

  • Vote: I like it
  • -32
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Why does it matter too much?

  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It's a serious debate, as the title of the blog says

»
8 months ago, # |
  Vote: I like it +27 Vote: I do not like it

n = n*(6968-6969)

»
8 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

How about n = ~n?

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

This is beta thing you know... Try this n = n - 2*n

»
8 months ago, # |
  Vote: I like it +3 Vote: I do not like it

n = binary_exponentiate(-1,69)*n

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

n=+-n is the best