Read More
Date: 19-1-2020
878
Date: 1-9-2020
649
Date: 13-8-2020
1274
|
The nearest integer function, also called nint or the round function, is defined such that is the integer closest to . While the notation is sometimes used to denote the nearest integer function (Hastad et al. 1988), this notation is rather cumbersome and is not recommended. Also note that while is sometimes used to denote the nearest integer function, is also commonly used to denote the floor function (including by Gauss in his third proof of quadratic reciprocity in 1808), so this notational use is also discouraged.
Since the definition is ambiguous for half-integers, the additional rule that half-integers are always rounded to even numbers is usually added in order to avoid statistical biasing. For example, , , , , etc. This convention is followed in the C math.h library function rint, as well as in the Wolfram Language, where the nearest integer function is implemented as Round[x].
Since usage concerning fractional part/value and integer part/value can be confusing, the following table gives a summary of names and notations used. Here, S&O indicates Spanier and Oldham (1987).
notation | name | S&O | Graham et al. | Wolfram Language |
ceiling function | -- | ceiling, least integer | Ceiling[x] | |
congruence | -- | -- | Mod[m, n] | |
floor function | floor, greatest integer, integer part | Floor[x] | ||
fractional value | fractional part or | SawtoothWave[x] | ||
fractional part | no name | FractionalPart[x] | ||
integer part | no name | IntegerPart[x] | ||
nearest integer function | -- | -- | Round[x] | |
quotient | -- | -- | Quotient[m, n] |
The plots above illustrate for small .
The nearest integer function can also be extended to the complex plane, as illustrated above.
REFERENCES:
Graham, R. L.; Knuth, D. E.; and Patashnik, O. "Integer Functions." Ch. 3 in Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, pp. 67-101, 1994.
Hastad, J.; Just, B.; Lagarias, J. C.; and Schnorr, C. P. "Polynomial Time Algorithms for Finding Integer Relations among Real Numbers." SIAM J. Comput. 18, 859-881, 1988.
Spanier, J.; Myland, J.; and Oldham, K. B. An Atlas of Functions, 2nd ed. Washington, DC: Hemisphere, 1987.
|
|
علامات بسيطة في جسدك قد تنذر بمرض "قاتل"
|
|
|
|
|
أول صور ثلاثية الأبعاد للغدة الزعترية البشرية
|
|
|
|
|
مدرسة دار العلم.. صرح علميّ متميز في كربلاء لنشر علوم أهل البيت (عليهم السلام)
|
|
|