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).

Representation of negative numbers in C?

How does C represent negative integers? Is it by two's complement representation or by using the MSB (most significant bit)? …

c language-lawyer negative-number twos-complement
Java Integers Min_Value negative then compare

I have a test tomorrow and I cant understand my books explanation, I appreciate the help: public class TestClass{ public …

java variables integer negative-number
Why can cosine similarity between two vectors be negative?

I have 2 vectors with 11 dimentions. a <- c(-0.012813841, -0.024518383, -0.002765056, 0.079496744, 0.063928973, 0.476156960, 0.122111977, 0.322930189, 0.400701256, 0.454048860, 0.525526219) b <- c(0.64175768, 0.54625694, 0.40728261, 0.24819750, 0.09406221, 0.16681692, -0.04211932, -0.07130129, -0.08182200, -0.08266852, …

r similarity negative-number trigonometry
trunc and round function in sql

Is trunc and round the same with negative arguments? SQL> select round(123456.76,-4) from dual; ROUND(123456.76,-4) ------------------- 120000 SQL&…

sql oracle truncate rounding negative-number
Python Argparse: Issue with optional arguments which are negative numbers

I'm having a small issue with argparse. I have an option xlim which is the xrange of a plot. I …

python argparse negative-number
Retrieve largest negative number and smallest positive number from list

Given a list of integers, e.g.: lst = [-5, -1, -13, -11, 4, 8, 16, 32] is there a Pythonic way of retrieving the …

python list max min negative-number
Why do Excel values in parentheses become negative values?

A colleague and I encountered a behavior in Excel which isn't clear to us. Background: We have a tool which …

excel brackets negative-number accounting
How to efficiently compare the sign of two floating-point values while handling negative zeros

Given two floating-point numbers, I'm looking for an efficient way to check if they have the same sign, given that …

floating-point compare sign zero negative-number
Python sorting list with negative number

In attempt to learn python by practicing, I am trying to implement and test out quick sort algorithm using python. …

python python-2.7 sorting quicksort negative-number
1000 * 60 * 60 * 24 * 30 results in a negative number

I'm attempting to calculate 30 days by multiplying milliseconds however the result continually ends up being a negative number for the …

java android math long-integer negative-number