Top "Negative-number" questions

A negative number is a number that is less than 0. It is signified by a preceding hyphen (i.e. -12,345).

Make a negative number positive

I have a Java method in which I'm summing a set of numbers. However, I want any negatives numbers to …

java negative-number
Javascript negative number

I want to check if a number is negative. I'm searching for the easiest way, so a predefined javascript function …

javascript negative-number
How to replace negative numbers in Pandas Data Frame by zero

I would like to know if there is someway of replacing all DataFrame negative numbers by zeros?

python pandas dataframe replace negative-number
working with negative numbers in python

I am a student in a concepts of programming class. The lab is run by a TA and today in …

python negative-number
How does java do modulus calculations with negative numbers?

Am I doing modulus wrong? Because in Java -13 % 64 is supposed to evaluate to -13 but I get 51.

java math modulo negative-number
Advantage of 2's complement over 1's complement?

What is the advantage of 2's complement over 1's complement in negative number representation in binary number system? How does …

binary negative-number
Why prefer two's complement over sign-and-magnitude for signed numbers?

I'm just curious if there's a reason why in order to represent -1 in binary, two's complement is used: flipping …

binary math twos-complement negative-number internal-representation
The modulo operation on negative numbers in Python

I've found some strange behaviour in Python regarding negative numbers: >>> -5 % 4 3 Could anyone explain what's going on?

python modulo negative-number
storing negative value in mysql

How can I store negative value in mysql decimal? I have data from DMS to Decimal having negative values, so …

mysql decimal mysql5 negative-number
How does Verilog behave with negative numbers?

For instance, say I have a reg [7:0] myReg I assign it the value -8'D69 I know Verilog stores it …

verilog negative-number