Calculate the sum of all integers whose absolute value is not greater than 2014
All integer ranges whose absolute value is not greater than 2014 is: -2014 ~ 0 ~ 2014
All integers whose absolute value is not greater than 2014 are -2014, 2014, -2013, 2013,..., -2, 2, -1, 1, 0, so according to the mutual The sum of two numbers that are opposites is 0. We know that the sum of these numbers is 0.
Absolute value
The absolute value refers to the distance from the corresponding point of a number on the number axis to the origin, represented by "| |". |b-a| or |a-b| represents the distance between the point representing a and the point representing b on the number axis.
In mathematics, the absolute value or non-negative value modulo | In this case -x is positive), | 0 | = 0. For example, the absolute value of 3 is 3, and the absolute value of -3 is also 3. The absolute value of a number can be thought of as its distance from zero.
Generalization of absolute values of real numbers occurs in a wide variety of mathematical settings, such as complex numbers, quaternions, ordered rings, fields, and vector spaces defining absolute values. Absolute value is closely related to the concepts of magnitude, distance and norm in various mathematical and physical contexts.
The above is the detailed content of Calculate the sum of all integers whose absolute value is not greater than 2014. For more information, please follow other related articles on the PHP Chinese website!