Top "Absolute-value" questions

Absolute value is a mathematical function that returns the non-negative value of a number without regard to its sign.

On the std::abs function

Is the std::abs() function well defined for ALL arithmetic types in C++11 and will return |x| with no problem …

c++ c++11 standards-compliance absolute-value
What is different about C++ math.h abs() compared to my abs()

I am currently writing some glsl like vector math classes in C++, and I just implemented an abs() function like …

c++ performance function math absolute-value
Sort a list in python

I have this list [1,-5,10,6,3,-4,-9] But now I want the list to be sorted like this: [10,-9,6,-5,…

python list sorting absolute-value
Calculating absolute value in Python

How do I make a program that asks for one floating point number in Python and then calculates the absolute …

python absolute-value
Find closest value to 0 in range of values in Excel (with non-numeric fields)

I have a range of cells in Excel with various positive and negative numbers. The value of the cell is …

excel min absolute-value
jfreechart customize piechart to show absolute values and percentages

How can this compilable minimal code snippet example, which uses JFreeChart as plotting API, adapted in order to show both …

java jfreechart percentage pie-chart absolute-value
Why use abs() or fabs() instead of conditional negation?

In C/C++, why should one use abs() or fabs() to find the absolute value of a variable without using …

c++ c variables negation absolute-value
How do I compute the absolute value of a vector in Eigen?

How do I compute the absolute value of a vector in Eigen? Since the obvious way Eigen::VectorXf v(-1.0,…

c++ eigen absolute-value
Julia - absolute value of an array

I want to get the absolute value of the following array: x = [1.1 -22.3 3.01, -1] i.e.: I want an output …

math julia linear-algebra absolute-value
Finding minimal absolute sum of a subarray

There's an array A containing (positive and negative) integers. Find a (contiguous) subarray whose elements' absolute sum is minimal, e.…

algorithm sum dynamic-programming absolute-value kadanes-algorithm