About 4,630,000 results
Open links in new tab
  1. Why doesn't Python have a sign function? - Stack Overflow

    Jan 1, 2010 · The question might be a little emotional, but I don't think it's a bad question. I'm sure lots of people have looked for a built-in sign function, so it can be curious why there isn't one.

  2. micro optimization - Fast sign of integer in C - Stack Overflow

    Jan 29, 2013 · One thing you can't assume is that negative numbers have a particular coding; sign-magnitude, one's complement and two's complement are well-known possibilities, but C …

  3. Is there a standard sign function (signum, sgn) in C/C++?

    Dec 15, 2009 · 111 It seems that most of the answers missed the original question. Is there a standard sign function (signum, sgn) in C/C++? Not in the standard library, however there is …

  4. algorithm - Number.sign () in javascript - Stack Overflow

    Oct 2, 2011 · Wonder if there are any nontrivial ways of finding number's sign (signum function)? May be shorter / faster / more elegant solutions than the obvious one var sign = number > 0 …

  5. What is the purpose of the dollar sign in JavaScript?

    Mar 29, 2022 · The dollar sign is treated just like a normal letter or underscore (_). It has no special significance to the interpreter. Unlike many similar languages, identifiers (such as …

  6. sign function in C using bit operators only - Stack Overflow

    Jul 21, 2014 · OP: Using (x >> 31) & 1 to extract the sign bit is, depending on the C implementation and the number of value bits in an int, either implementation defined, or …

  7. Filling a DataFrame with "sign" numbers - Stack Overflow

    I have a DataFrame full of floats (positive and negative) and some NaN. I'd like to replace every single float number with its sign: if it's NaN -> it remains Nan if positive -> replace with...

  8. What is the dollar sign in Javascript, if not jQuery

    Mar 7, 2014 · Back then the dollar sign was used for all the jQuery functionality, and if no jQuery library was imported, the dollar sign was not defined. Today, I started up Firefox, in a …

  9. Any way to extract the sign of a number in Python?

    Apr 9, 2015 · Any way to extract the sign of a number in Python? Asked 10 years, 8 months ago Modified 2 months ago Viewed 8k times

  10. Get the sign of a number in C# without conditional statement

    Jul 22, 2015 · -1 Just out of curiosity, is there a way to get the sign of a number, any kind (but obviously a signed type), not just integer using some bitwise/masking, or other kind of, …